public void Update_NoPendingChanges_Failure() { BaseUnitTests.Reset(); PortGroupServer oServer = new PortGroupServer(_mockServer, "PortGroupObjectId"); var res = oServer.Update(); Assert.IsFalse(res.Success, "Calling Update with no pending chnages should fail"); }
public void Update_ErrorRespnse_Failure() { PortGroupServer oServer = new PortGroupServer(_mockServer, "PortGroupObjectId"); oServer.DisplayName = "New display name"; _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 }); var res = oServer.Update(); Assert.IsFalse(res.Success, "Calling Update with error response should fail"); }