예제 #1
0
        public void Get_ShouldTestAPositiveGetRequestForUserGoals()
        {
            // Arrange
            GoalsController controller = new GoalsController(mockGoalService.Object);

            // Act
            IEnumerable <Goal> result = controller.Get(USERID);

            // Assert
            Assert.IsNotNull(result);
        }
예제 #2
0
        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);
        }