Example #1
0
        public void GetDataByTestTypeIdTest()
        {
            _repository
            .Setup(it => it.GetDataByTestTypeId(It.IsAny <Int32>()))
            .Returns <Int32>((testTypeId) =>
            {
                return(_repositoryList.Where(x => x.TestTypeId == testTypeId).ToList());
            });

            var result = _target.GetDataByTestTypeId(testTypeIdValue).ToList();

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