public void GetPortGroup_EmptyObjectIdAndName_Failure() { PortGroup oPortGroup; var res = PortGroup.GetPortGroup(out oPortGroup, _mockServer, ""); Assert.IsFalse(res.Success, "Fetching port group with empty objectId and name should fail."); }
public void GetPortGroup_NullConnectionServer_Failure() { PortGroup oPortGroup; var res = PortGroup.GetPortGroup(out oPortGroup, null, "ObjectId"); Assert.IsFalse(res.Success, "Fetching port group with null Connection server should fail."); }
public void GetPortGroup_ErrorResponse_Failure() { Reset(); //error response _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), MethodType.GET, It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), true)).Returns(new WebCallResult { Success = false, ResponseText = "error text", StatusCode = 404 }); PortGroup oPortGroup; var res = PortGroup.GetPortGroup(out oPortGroup, _mockServer, "objectId"); Assert.IsFalse(res.Success, "Calling GetPortGroup with ErrorResponse did not fail"); }