Exemplo n.º 1
0
 public void Parameter()
 {
     Assert.AreEqual("3.4.5.6" + Environment.NewLine, TestHost.Execute("New-Object version \"3.4.5.6\""));
 }
Exemplo n.º 2
0
 public void BuiltinType()
 {
     Assert.AreEqual("False" + Environment.NewLine, TestHost.Execute("New-Object bool"));
 }
Exemplo n.º 3
0
 public void WebClient()
 {
     Assert.AreEqual("System.Net.WebClient" + Environment.NewLine, TestHost.Execute("New-Object Net.WebClient"));
 }
Exemplo n.º 4
0
 public void ValueTypes()
 {
     Assert.AreEqual("False" + Environment.NewLine, TestHost.Execute("New-Object Boolean"));
 }
Exemplo n.º 5
0
 public void SystemPrefixIsOptional()
 {
     Assert.AreEqual("0.0" + Environment.NewLine, TestHost.Execute("New-Object Version"));
 }
Exemplo n.º 6
0
 public void CaseInsenstive()
 {
     Assert.AreEqual("0.0" + Environment.NewLine, TestHost.Execute("New-Object version"));
 }
Exemplo n.º 7
0
 public void CanCreateTypeWithNoParameters()
 {
     Assert.AreEqual("0.0" + Environment.NewLine, TestHost.Execute("New-Object System.Version"));
 }
        private string RunTestVerboseOutputCommand(string parameters)
        {
            string command = "Test-VerboseOutput";

            return(TestHost.Execute(command + " " + parameters));
        }
Exemplo n.º 9
0
        public void TwoParentFolders()
        {
            string result = TestHost.Execute(string.Format(@"Split-Path parent1{0}child,parent2{0}child", Path.DirectorySeparatorChar));

            Assert.AreEqual(string.Format(@"parent1{0}parent2{0}", Environment.NewLine), result);
        }
Exemplo n.º 10
0
        public void OneParentFolder()
        {
            string result = TestHost.Execute(string.Format(@"Split-Path 'parent{0}child'", Path.DirectorySeparatorChar));

            Assert.AreEqual(@"parent" + Environment.NewLine, result);
        }
Exemplo n.º 11
0
 public void WebClient()
 {
     Assert.AreEqual(typeof(System.Net.WebClient).Name + Environment.NewLine,
                     TestHost.Execute("(New-Object Net.WebClient).GetType().Name"));
 }