private void ArrangeTestAccordingToItem(Item expectedItem) { _timeManager.GetCurrentTime().Returns(expectedItem.CreationTime); _guidGenerator.GenerateId().Returns(expectedItem.Id); _repository.AddItemAsync(ArgWrapper.IsItem(expectedItem)) .Returns(Task.FromResult(expectedItem)); }
private void ArrangeTestAccordingToItem(Item expectedItem, Item itemForUpdate) { _timeManager.GetCurrentTime().Returns(expectedItem.LastUpdateTime); _getItemService.GetItemAsync(itemForUpdate.Id).Returns(Task.FromResult(new RetrievedItem <Item>(itemForUpdate))); _repository .UpdateItemAsync(ArgWrapper.IsItem(expectedItem)) .Returns(Task.FromResult(expectedItem)); }