public PowerShellScriptProjectInfo( string name, string artifactsRepositoryName, IEnumerable<string> allowedEnvironmentNames, string artifactsRepositoryDirName, bool artifactsAreNotEnvironmentSpecific, TargetMachine targetMachine, string scriptName, bool isRemote, List<string> dependendProjectNames = null) : base(name, artifactsRepositoryName, allowedEnvironmentNames, dependendProjectNames, artifactsRepositoryDirName, artifactsAreNotEnvironmentSpecific) { Guard.NotNullNorEmpty(scriptName, "scriptName"); TargetMachine = targetMachine; ScriptName = scriptName; IsRemote = isRemote; }
public void TargetMachineConstructorWithInvalidParameterTest() { // Invalid parameter string inputValue = "InvalidParameter"; // User WWTMockRequest in WWTManager so that all calls to WWT API will succeed. Globals_Accessor.wwtManager = new WWTManager(new WWTMockRequest()); TargetMachine target = new TargetMachine(inputValue); Assert.Fail("TargetMachine object initialized with invalid parameter!"); }
public void TargetMachineConstructorWithInvalidIPAddressTest() { // Random IP address (Invalid) string inputValue = "121.242.121.242"; // User WWTMockRequest in WWTManager so that all calls to WWT API will succeed. Globals_Accessor.wwtManager = new WWTManager(new WWTMockRequest()); TargetMachine target = new TargetMachine(inputValue); Assert.Fail("TargetMachine object initialized with invalid IP Address!"); }
public void TargetMachineConstructorDefaultTest() { TargetMachine target = new TargetMachine(); // Make sure target is not null. Assert.IsNotNull(target); // Make sure MachineIP is not null. Assert.IsNotNull(target.MachineIP); // Make sure DisplayValue is not null. Assert.IsNotNull(target.DisplayValue); }