public void ShouldGetClientsInOrangeZone() { //Arrange var clientsWhichHaveZeroBalance = clientTableRepository.GetAllInOrangeZone(); IEnumerable <ClientEntity> clientsInOrangeZone; //Act clientsInOrangeZone = clientsService.GetAllInOrangeZone(); //Assert Assert.AreEqual(clientsWhichHaveZeroBalance, clientsInOrangeZone); }
public void Initialize() { clientTableRepository = Substitute.For <IClientTableRepository>(); sharesTableRepository = Substitute.For <ISharesTableRepository>(); clientTableRepository.GetById(1).Returns(new ClientEntity() { Id = 1, Balance = 0M, Name = "Vlad Blood" }); clientTableRepository.GetAllInOrangeZone() .Returns(new List <ClientEntity>()); clientTableRepository.GetAllInBlackZone() .Returns(new List <ClientEntity>()); clientsService = new ClientsService(clientTableRepository, sharesTableRepository); }
public ICollection <ClientEntity> GetAllInOrangeZone() { return(clientTableRepository.GetAllInOrangeZone()); }