public void GetEnterpriseRegistrySettingTest_FileDoesNotExist() { string filePath = @"C:\" + Guid.NewGuid().ToString(); DefaultScriptRegistry actual; actual = DefaultScriptHelper.GetEnterpriseRegistrySetting(filePath); Assert.IsNull(actual); }
public void GetEnterpriseRegistrySettingTest_InvalidFile() { string filePath = this.fileOne; DefaultScriptRegistry actual; actual = DefaultScriptHelper.GetEnterpriseRegistrySetting(filePath); Assert.IsNull(actual); }
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); }