Esempio n. 1
0
        public void Constructor_ExpectedValues()
        {
            // Setup
            string completeDatabasePath = Path.Combine(directoryPath, "withoutPreprocessor.config.sqlite");

            // Call
            using (var validator = new HydraRingSettingsDatabaseValidator(completeDatabasePath, string.Empty))
            {
                // Assert
                Assert.IsInstanceOf <SqLiteDatabaseReaderBase>(validator);
            }
        }
Esempio n. 2
0
        public void ValidateSchema_NoPreprocessorInvalidDatabase_ReturnFalse(string databaseName)
        {
            // Setup
            string completeDatabasePath = Path.Combine(directoryPath, $"{databaseName}.config.sqlite");

            using (var validator = new HydraRingSettingsDatabaseValidator(completeDatabasePath, string.Empty))
            {
                // Call
                bool valid = validator.ValidateSchema();

                // Assert
                Assert.IsFalse(valid);
            }
        }
Esempio n. 3
0
        public void ValidateSchema_PreprocessorValidDatabase_ReturnTrue()
        {
            // Setup
            string completeDatabasePath = Path.Combine(directoryPath, "withPreprocessor.config.sqlite");

            using (var validator = new HydraRingSettingsDatabaseValidator(completeDatabasePath, directoryPath))
            {
                // Call
                bool valid = validator.ValidateSchema();

                // Assert
                Assert.IsTrue(valid);
            }
        }