コード例 #1
0
        public void ShouldGetClientsInOrangeZone()
        {
            //Arrange
            var clientsWhichHaveZeroBalance = clientTableRepository.GetAllInOrangeZone();
            IEnumerable <ClientEntity> clientsInOrangeZone;

            //Act
            clientsInOrangeZone = clientsService.GetAllInOrangeZone();

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