Example #1
0
        public void ReadExcludedPreprocessorLocations_InvalidValueInReadLocation_ThrowsCriticalFileReadException()
        {
            // Setup
            using (var reader = new HydraRingSettingsDatabaseReader(invalidDatabasePath))
            {
                // Call
                TestDelegate test = () => reader.ReadExcludedPreprocessorLocations().ToArray();

                // Assert
                Assert.Throws <CriticalFileReadException>(test);
            }
        }
Example #2
0
        public void ReadExcludedPreprocessorLocations_EmptyTable_ReturnsEmptyEnumerable()
        {
            // Setup
            using (var reader = new HydraRingSettingsDatabaseReader(emptyDatabasePath))
            {
                // Call
                IEnumerable <long> locations = reader.ReadExcludedPreprocessorLocations();

                // Assert
                CollectionAssert.IsEmpty(locations);
            }
        }
Example #3
0
        public void ReadExcludedPreprocessorLocations_TableWithRows_ReturnsAllLocationIdsInTable()
        {
            // Setup
            using (var reader = new HydraRingSettingsDatabaseReader(completeDatabasePath))
            {
                // Call
                IEnumerable <long> locations = reader.ReadExcludedPreprocessorLocations();

                // Assert
                CollectionAssert.AreEqual(new[]
                {
                    700136
                }, locations);
            }
        }