Ejemplo n.º 1
0
        private void CreateACoupleOfPoints(StorageHandler storeHandler, int deviceId)
        {
            storeHandler.AddDeviceValueToDatabase(1, new DateTime(2000, 1, 1, 0, 0, 1), deviceId);

            storeHandler.AddDeviceValueToDatabase(2, new DateTime(2000, 1, 1, 0, 0, 2), deviceId);

            storeHandler.AddDeviceValueToDatabase(3, new DateTime(2000, 1, 1, 0, 0, 3), deviceId);
        }
Ejemplo n.º 2
0
        public void Maintenance_ShouldDeleteSomething()
        {
            var deviceId = 530;

            _iniSettings.DaysOfDataStorage.Returns(5);
            var dbPath = CreateCopyOfDbAndReturnPath("DataCurveSeer_okt2019.db");

            var storageHandler = new StorageHandler(_logging, _iniSettings, dbPath);

            SystemDateTime.Now = () => new DateTime(2019, 10, 16, 0, 0, 0);

            storageHandler.AddDeviceValueToDatabase(99, SystemDateTime.Now(), deviceId);

            storageHandler.AddDeviceValueToDatabase(99, SystemDateTime.Now(), deviceId);
        }