public void Get_ShouldTestAPositiveGetRequestForUserGoals() { // Arrange GoalsController controller = new GoalsController(mockGoalService.Object); // Act IEnumerable <Goal> result = controller.Get(USERID); // Assert Assert.IsNotNull(result); }
public void Get_ShouldReturnAKnownUserGoalByUserIDAndGoalID() { mockGoalService.Setup(gs => gs.GetGoal(It.Is <int>(val => val == GOALID))).Returns(goal); // Arrange GoalsController controller = new GoalsController(mockGoalService.Object); // Act Goal result = controller.Get(USERID, GOALID); // Assert Assert.IsNotNull(result); }