Skip to content

Instantly share code, notes, and snippets.

Created March 16, 2023 18:57
What would you like to do?
public async Task TestWithInterface()
var utcNow = new DateTimeOffset(new DateTime(2022, 11, 28));
_mockSystemDateTime.Setup(x => x.UtcNow()).Returns(utcNow);
var obj = new OrderServiceWithInterface(_mockBasketRepo.Object, _mockCatalogRepo.Object, _mockOrderRepo.Object, _mockUriComposer.Object, _mockSystemDateTime.Object);
var address = new Address("120 Freidrich Lane", "Austin", "TX", "US", "78744");
var order = await obj.CreateOrderAsync(_basketId, address);
Assert.Equal(utcNow, order.OrderDate);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment