iotedge-lorawan-starterkit
iotedge-lorawan-starterkit copied to clipboard
[Bug] ValidateCloudToDeviceMessage should have unit tests
ValidateCloudToDeviceMessage is tested as part of CloudToDeviceMessageSizeLimitShouldRejectTests.Should_Reject. The setup required to run different branches of the method, is massive and we also test a lot of other dependencies. There was some flakyness we observed due to other components being involved (see #592 ). As part of that investigation, we decided that adding an isolated unit test for the method, would help testing it more thorougly.
Expected Behavior
Have an isolated unit test for the logic in DefaultLoRaDataRequestHandler.ValidateCloudToDeviceMessage. Make it a protected method, that we can directly access and operate.
Current Behavior
A complex scenario test is used to only test the branches partially.