Exemple #1
0
        public void GetEnterpriseRegistrySettingTest_FileDoesNotExist()
        {
            string filePath = @"C:\" + Guid.NewGuid().ToString();

            DefaultScriptRegistry actual;

            actual = DefaultScriptHelper.GetEnterpriseRegistrySetting(filePath);
            Assert.IsNull(actual);
        }
Exemple #2
0
        public void GetEnterpriseRegistrySettingTest_InvalidFile()
        {
            string filePath = this.fileOne;

            DefaultScriptRegistry actual;

            actual = DefaultScriptHelper.GetEnterpriseRegistrySetting(filePath);
            Assert.IsNull(actual);
        }
Exemple #3
0
        public void GetEnterpriseRegistrySettingTest_GoodFileExists()
        {
            string filePath = Path.GetTempFileName();

            File.WriteAllText(filePath, Properties.Resources.DefaultScriptRegistry);

            DefaultScriptRegistry actual;

            actual = DefaultScriptHelper.GetEnterpriseRegistrySetting(filePath);
            File.Delete(filePath);
            Assert.IsNotNull(actual);
            Assert.IsInstanceOfType(actual, typeof(SqlSync.SqlBuild.DefaultScripts.DefaultScriptRegistry));
            Assert.IsNotNull(actual.Items);
            Assert.IsTrue(actual.Items.Length == 1);
        }