public async Task GivenASessionId_WhenNumberOfItemsInCartIsRequested_ThenCorrectNumberIsReturned() { GetCartItems getCartItems = new GetCartItems(_mockIRedisCacheClient.Object, _mockILogger.Object); var result = await getCartItems.GetItemsInCart("test"); Assert.AreEqual(2, result.Count); }
public async Task GivenASessionId_WhenAllItemsForSessionAreRequested_ThenAllItemsAreReturned() { GetCartItems getCartItems = new GetCartItems(_mockIRedisCacheClient.Object, _mockILogger.Object); var result = await getCartItems.GetItemsInCart("test"); Assert.AreEqual("three", result[0].Id); Assert.AreEqual("four", result[1].Id); }