public void ShouldGetFirstClients() { // Arrange reportsService = new ReportsService( operationTableRepository: this.operationTableRepository, sharesNumberTableRepository: this.sharesNumberTableRepository, balanceTableRepository: this.balanceTableRepository, shareTableRepository: this.shareTableRepository, clientTableRepository: this.clientTableRepository); // Act List <ClientEntity> clients = new List <ClientEntity>(); clients.AddRange(reportsService.GetFirstClients(5, 1)); // Assert this.clientTableRepository.Received(1).Take(5, 1); for (int i = 0; i < 5; i++) { if (clients[i].Id != i + 1) { throw new ArgumentException("Wrong id in list of clients."); } } }