Create() public static method

public static Create ( string machineName, string environmentName ) : Environment
machineName string
environmentName string
return Environment
Exemplo n.º 1
0
 public void ThatWhenAnEnvironmentIsCreatedWithoutANameAnExceptionIsThrown()
 {
     try
     {
         Environment.Create("Test", string.Empty);
         Assert.Fail("An exception should be thrown");
     }
     catch (Exception e)
     {
         Assert.IsNotInstanceOfType(e, typeof(AssertFailedException));
     }
 }
Exemplo n.º 2
0
        public void ThatMachineIsSetToLocalMachineNameWhenNotExplicitlySetInConstructor()
        {
            var env = Environment.Create(System.Environment.MachineName, "Test");

            Assert.AreEqual(System.Environment.MachineName, env.MachineName);
        }
Exemplo n.º 3
0
        public void ThatNameHasAValueWhenEnvironmentIsCreated()
        {
            var env = Environment.Create("Test", "Test");

            Assert.AreEqual("Test", env.Name);
        }