public void PollSensorReadingsRemovesSensorData()
        {
            var hardwareController = new HardwareController();
            var random = new Random();

            SensorData[] sensorDatas = new SensorData[random.Next(1, 5)];
            for (int i = 0; i < sensorDatas.Length; i++)
            {
                var sensorData = new SensorData
                                     {
                                         Humidity = random.Next(0, 100) / 100,
                                         Pressure = random.Next(0, 100) / 100
                                     };

                sensorDatas[i] = sensorData;
            }

            hardwareController.AddSensorReadings(sensorDatas);
            hardwareController.PollSensorReadings(0);

            Assert.AreEqual(0, hardwareController.GetSensorDataBufferCount());
        }
        public void GetSensorDataBufferCount()
        {
            var hardwareController = new HardwareController();
            var random = new Random();

            int dataCount = random.Next(1, 5);
            for (int i = 0; i < dataCount; i++)
            {
                SensorData[] sensorDatas = new SensorData[random.Next(1, 5)];
                for (int j = 0; j < sensorDatas.Length; j++)
                {
                    var sensorData = new SensorData
                                         {
                                             Humidity = random.Next(0, 100) / 100,
                                             Pressure = random.Next(0, 100) / 100
                                         };

                    sensorDatas[j] = sensorData;
                }

                hardwareController.AddSensorReadings(sensorDatas);
            }

            Assert.AreEqual(dataCount, hardwareController.GetSensorDataBufferCount());
        }