Beispiel #1
0
        public void News_GetCompanyCounts_ShouldAssertsTrue_WhenListIsNotNull()
        {
            var mock = new Mock <INewsServices>();

            mock.Setup(p => p.GetCompanyCounts()).Returns(new List <Business.Dto.CompanyCountModel> {
                new Business.Dto.CompanyCountModel {
                    Name = "test", Count = 100
                }
            });
            var mockManager = new NewsRepository(mock.Object);
            var result      = mockManager.GetCompanyCounts();

            Assert.NotNull(result);
        }