Ejemplo n.º 1
0
        public void GetActiveDataByGroupIdTest()
        {
            _repository
            .Setup(it => it.GetActiveDataByGroupId(It.IsAny <Int32>()))
            .Returns <Int32>((groupId) =>
            {
                return(_repositoryList.Where(x => x.GroupId == groupId).ToList());
            });

            var result = _target.GetActiveDataByGroupId(groupIdValue).ToList();

            Assert.AreEqual(_repositoryList.Where(x => x.GroupId == groupIdValue).ToList().Count, result.Count);
        }