public void ShouldThrowExceptionIfCantFindClientStock() { // Arrange ClientStockService clientStockService = new ClientStockService(clientStockTableRepository); clientStockTableRepository.ContainsByPK(1, 1).Returns(false); // Act var clientStock = clientStockService.GetEntityByCompositeID(1, 1); }
public void ShouldGetClientStockInfo() { // Arrange ClientStockService clientStockService = new ClientStockService(clientStockTableRepository); clientStockTableRepository.ContainsByPK(1, 1).Returns(true); // Act var clientStock = clientStockService.GetEntityByCompositeID(1, 1); // Assert clientStockTableRepository.Received(1).FindByPK(1, 1); }