Example #1
0
        public async void GetByIdAsync_When_Called_Should_Return_Broker_including_Customers()
        {
            //Arrange
            SoftDbContext _context          = new SoftDbContext();
            var           _brokerRepository = new BrokerRepository(_context);

            //Act
            var firstBrokerInRepository = _context.Brokers.FirstOrDefault();

            Assert.NotNull(firstBrokerInRepository);
            var broker = await _brokerRepository.FindByIdAsync(firstBrokerInRepository.Id);

            //Assert
            Assert.NotEmpty(broker.Customers);
        }