public void Put_Valid_API() { //Arrange Activity item = new Activity() { ID = id, IdentityGUID = "1", CheckpointIP = "192.168.0.1", Date = DateTime.Now, ModeID = 1, Status = true }; //Act var actionResult = controllerAPI.Put(id, item); var contentResult = actionResult as OkNegotiatedContentResult <Activity>; //Assert Assert.IsNotNull(contentResult); Assert.IsNotNull(contentResult.Content); Assert.IsInstanceOfType(contentResult.Content, typeof(Activity)); }