public void DeletePortGroup_ErrorResponse_Failure() { Reset(); //error response _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), It.IsAny <MethodType>(), It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), It.IsAny <bool>())).Returns(new WebCallResult { Success = false, ResponseText = "error text", StatusCode = 404 }); var res = PortGroup.DeletePortGroup(_mockServer, "PortGroupOBjectId"); Assert.IsFalse(res.Success, "Calling DeletePortGroup with ErrorResponse did not fail"); }
public void DeletePortGroup_NullConnectionServer_Failure() { var res = PortGroup.DeletePortGroup(null, "ObjectId"); Assert.IsFalse(res.Success, "Calling DeletePortGroup with null ConnectionServer should fail."); }
public void DeletePortGroup_EmptyObjectId_Failure() { var res = PortGroup.DeletePortGroup(_mockServer, ""); Assert.IsFalse(res.Success, "Calling DeletePortGroup with empty ObjectId should fail."); }