Create() public static method

public static Create ( string machineName, string environmentName ) : Environment
machineName string
environmentName string
return Environment
Example #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));
     }
 }
Example #2
0
        public void ThatMachineIsSetToLocalMachineNameWhenNotExplicitlySetInConstructor()
        {
            var env = Environment.Create(System.Environment.MachineName, "Test");

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

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