public async Task Single_OTAA_Simulated_Device()
        {
            const int MessageCount = 5;

            var device                  = this.TestFixture.Device1002_Simulated_OTAA;
            var simulatedDevice         = new SimulatedDevice(device);
            var networkServerIPEndpoint = CreateNetworkServerEndpoint();

            using (var simulatedPacketForwarder = new SimulatedPacketForwarder(networkServerIPEndpoint))
            {
                simulatedPacketForwarder.Start();

                bool joined = await simulatedDevice.JoinAsync(simulatedPacketForwarder);

                Assert.True(joined, "OTAA join failed");

                await Task.Delay(intervalAfterJoin);

                for (var i = 1; i <= MessageCount; i++)
                {
                    await simulatedDevice.SendUnconfirmedMessageAsync(simulatedPacketForwarder, i.ToString());

                    await Task.Delay(intervalBetweenMessages);
                }

                await simulatedPacketForwarder.StopAsync();
            }

            // wait 10 seconds before checking if iot hub content is available
            await Task.Delay(TimeSpan.FromSeconds(10));

            var msgsFromDevice = this.TestFixture.IoTHubMessages.GetEvents().Where(x => x.GetDeviceId() == simulatedDevice.LoRaDevice.DeviceID);

            Assert.Equal(MessageCount, msgsFromDevice.Count());
        }
        //[Fact]
        public async Task Simulated_Http_Based_Decoder_Scenario()
        {
            var device                  = this.TestFixture.Device1003_Simulated_HttpBasedDecoder;
            var simulatedDevice         = new SimulatedDevice(device);
            var networkServerIPEndpoint = CreateNetworkServerEndpoint();

            using (var simulatedPacketForwarder = new SimulatedPacketForwarder(networkServerIPEndpoint))
            {
                simulatedPacketForwarder.Start();

                bool joined = await simulatedDevice.JoinAsync(simulatedPacketForwarder);

                Assert.True(joined, "OTAA join failed");

                await Task.Delay(intervalAfterJoin);

                for (var i = 1; i <= 3; i++)
                {
                    await simulatedDevice.SendUnconfirmedMessageAsync(simulatedPacketForwarder, i.ToString());

                    await Task.Delay(intervalBetweenMessages);
                }

                await simulatedPacketForwarder.StopAsync();
            }

            // wait 10 seconds before checking if iot hub content is available
            await Task.Delay(TimeSpan.FromSeconds(10));
        }
        public async Task Single_ABP_Simulated_Device()
        {
            const int MessageCount = 5;

            var device                  = this.TestFixture.Device1001_Simulated_ABP;
            var simulatedDevice         = new SimulatedDevice(device);
            var networkServerIPEndpoint = CreateNetworkServerEndpoint();

            using (var simulatedPacketForwarder = new SimulatedPacketForwarder(networkServerIPEndpoint))
            {
                simulatedPacketForwarder.Start();

                for (var i = 1; i <= MessageCount; i++)
                {
                    await simulatedDevice.SendUnconfirmedMessageAsync(simulatedPacketForwarder, i.ToString());

                    await Task.Delay(intervalBetweenMessages);
                }

                await simulatedPacketForwarder.StopAsync();
            }
        }