Exemplo n.º 1
0
        public void It_Should_Get_The_History_List_With_The_Same_Items()
        {
            //Arrange
            var             expectedList = entryList;
            MortgageService service      = new MortgageService(repositoryServiceMock.Object);

            //Act
            var historyList = service.GetHistory();

            //Assert
            Assert.AreEqual(expectedList.FirstOrDefault().Id, historyList.FirstOrDefault().Id);
        }
Exemplo n.º 2
0
        public void It_Should_Get_The_History_List()
        {
            //Arrange
            var             expectedList = entryList;
            MortgageService service      = new MortgageService(repositoryServiceMock.Object);

            //Act
            var historyList = service.GetHistory();

            //Assert
            Assert.AreEqual(expectedList.Count, historyList.Count());
        }
Exemplo n.º 3
0
        public void It_Should_Get_An_Empty_List()
        {
            //Arrange
            var expectedList = entryList;

            repositoryServiceMock.Setup(s => s.WhereAllEq <MortgageEntry>(filters, null)).Returns(new List <MortgageEntry>());
            MortgageService service = new MortgageService(repositoryServiceMock.Object);

            //Act
            var historyList = service.GetHistory();

            //Assert
            Assert.AreNotEqual(expectedList.Count, historyList.Count());
            Assert.AreEqual(historyList.Count(), 0);
        }