public void ShouldGetClientsInBlackZone() { //Arrange var clientsWhichHaveLessThanZeroBalance = clientTableRepository.GetClientsInBlackZone(); IEnumerable <ClientEntity> clientsInBlackZone; //Act clientsInBlackZone = clientsService.GetClientsInBlackZone(); //Assert Assert.AreEqual(clientsWhichHaveLessThanZeroBalance, clientsInBlackZone); }
public void Initialize() { clientTableRepository = Substitute.For <IClientTableRepository>(); clientTableRepository.GetById(1).Returns(new ClientEntity() { Id = 1, Balance = 0M, Name = "Vlad Blood" }); clientTableRepository.GetClientsInOrangeZone() .Returns(new List <ClientEntity>()); clientTableRepository.GetClientsInBlackZone() .Returns(new List <ClientEntity>()); clientsService = new ClientsService(clientTableRepository); }
public ICollection <ClientEntity> GetClientsInBlackZone() { return(clientTableRepository.GetClientsInBlackZone()); }