Exemplo n.º 1
0
        public void Delete_Group_Post()
        {
            Group fake = new Group()
            {
                GroupId = 1,
                GroupName = "test",
                Description = "test"
            };
            groupRepository.Setup(x => x.GetById(fake.GroupId)).Returns(fake);


            Assert.IsNotNull(fake);
            Assert.AreEqual(1, fake.GroupId);
            GroupController controller = new GroupController(groupService, groupUserService, userService, metricService, focusService, groupgoalService, groupInvitationService, securityTokenService, groupUpdateService, groupCommentService, goalStatusService, groupRequestService, followUserService, groupCommentUserService, groupUpdateSupportService, groupUpdateUserService);
            var result = controller.DeleteConfirmedGroup(1) as RedirectToRouteResult;
            Assert.AreEqual("Index", result.RouteValues["action"]);

        }