Exemplo n.º 1
0
        public void InstallNonConfig()
        {
            // Arrange
            var doc = XDocument.Parse(@"<?xml version=""1.0"" encoding=""utf-8""?>
<slam>
</slam>
");

            // Act
            var actual = Try <ArgumentException>(() => EFIngresProviderInstaller.Install("Test", doc, true, true));

            // Assert
            Assert.IsNotNull(actual);
        }
Exemplo n.º 2
0
        public void InstallEmptyConfig()
        {
            // Arrange
            var doc = XDocument.Parse(@"<?xml version=""1.0"" encoding=""utf-8""?>
<configuration>
</configuration>
");

            // Act
            var actual = EFIngresProviderInstaller.Install("Test", doc, true, true);

            Console.WriteLine(doc.ToString(SaveOptions.None));

            // Assert
            Assert.IsTrue(actual);
        }
Exemplo n.º 3
0
 private static void InstallProviderToConfig(string configFile, bool removeFirst)
 {
     ConsoleLog.WriteLine("Installing EFIngresProvider to {0}", Path.GetFileName(configFile));
     using (ConsoleLog.Indent())
     {
         ConsoleLog.WriteLine("File: {0}", configFile);
         var changed = EFIngresProviderInstaller.Install(configFile, removeFirst, true);
         if (changed)
         {
             ConsoleLog.WriteLine("Installed");
         }
         else
         {
             ConsoleLog.WriteLine("Already installed - no changes written to the file");
         }
     }
 }