Пример #1
0
        public void Update_Supporters_Count()
        {
            IEnumerable<GroupUpdateSupport> updtsprt = new List<GroupUpdateSupport> {            

            new GroupUpdateSupport { GroupUpdateSupportId =1, GroupUpdateId = 1,GroupUserId = 1},
            new GroupUpdateSupport { GroupUpdateSupportId =2, GroupUpdateId = 1,GroupUserId = 2},
            new GroupUpdateSupport { GroupUpdateSupportId =3, GroupUpdateId = 1,GroupUserId = 3},
          
             
            
          }.AsEnumerable();

            groupUpdateSupportRepository.Setup(x => x.GetMany(It.IsAny<Expression<Func<GroupUpdateSupport, bool>>>())).Returns(updtsprt);
            GroupController controller = new GroupController(groupService, groupUserService, userService, metricService, focusService, groupgoalService, groupInvitationService, securityTokenService, groupUpdateService, groupCommentService, goalStatusService, groupRequestService, followUserService, groupCommentUserService, groupUpdateSupportService, groupUpdateUserService);
            int count = controller.NoOfSupports(1);
            Assert.IsNotNull(count);
            Assert.AreEqual("3", count.ToString());

        }