コード例 #1
0
        public void ShouldGetClientsInBlackZone()
        {
            //Arrange
            var clientsWhichHaveLessThanZeroBalance = clientTableRepository.GetClientsInBlackZone();
            IEnumerable <ClientEntity> clientsInBlackZone;

            //Act
            clientsInBlackZone = clientsService.GetClientsInBlackZone();

            //Assert
            Assert.AreEqual(clientsWhichHaveLessThanZeroBalance, clientsInBlackZone);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 public ICollection <ClientEntity> GetClientsInBlackZone()
 {
     return(clientTableRepository.GetClientsInBlackZone());
 }