public static Create ( string machineName, string environmentName ) : Environment | ||
machineName | string | |
environmentName | string | |
Результат | Environment |
public void ThatWhenAnEnvironmentIsCreatedWithoutANameAnExceptionIsThrown() { try { Environment.Create("Test", string.Empty); Assert.Fail("An exception should be thrown"); } catch (Exception e) { Assert.IsNotInstanceOfType(e, typeof(AssertFailedException)); } }
public void ThatMachineIsSetToLocalMachineNameWhenNotExplicitlySetInConstructor() { var env = Environment.Create(System.Environment.MachineName, "Test"); Assert.AreEqual(System.Environment.MachineName, env.MachineName); }
public void ThatNameHasAValueWhenEnvironmentIsCreated() { var env = Environment.Create("Test", "Test"); Assert.AreEqual("Test", env.Name); }