Esempio n. 1
0
        public void ReadPreprocessorSetting_ValidLocationIdNotInDatabase_ReturnNull()
        {
            // Setup
            using (var reader = new HydraRingSettingsDatabaseReader(emptyDatabasePath))
            {
                // Call
                ReadPreprocessorSetting preprocessorSetting = reader.ReadPreprocessorSetting(700131);

                // Assert
                Assert.IsNull(preprocessorSetting);
            }
        }
        public void Constructor_ExpectedValues()
        {
            // Setup
            var    random   = new Random(11);
            double valueMin = random.NextDouble();
            double valueMax = random.NextDouble();

            // Call
            var readPreprocessorSetting = new ReadPreprocessorSetting(valueMin, valueMax);

            // Assert
            Assert.AreEqual(valueMin, readPreprocessorSetting.ValueMin);
            Assert.AreEqual(valueMax, readPreprocessorSetting.ValueMax);
        }
Esempio n. 3
0
        public void ReadPreprocessorSetting_ValidLocationId_ReadPreprocessorSettingWithExpectedValues(long locationId,
                                                                                                      double valueMin,
                                                                                                      double valueMax)
        {
            // Setup
            using (var reader = new HydraRingSettingsDatabaseReader(completeDatabasePath))
            {
                // Call
                ReadPreprocessorSetting preprocessorSetting = reader.ReadPreprocessorSetting(locationId);

                // Assert
                Assert.AreEqual(valueMin, preprocessorSetting.ValueMin);
                Assert.AreEqual(valueMax, preprocessorSetting.ValueMax);
            }
        }