public void Clear_ExistingGuidPassed() { var cartID = "9b3df90a-1007-4778-b614-91df990e0c95"; var mockHttpContext = MockHttpSession.setSessionKey(cartID); _controller.ControllerContext.HttpContext = mockHttpContext.Object; // Act _controller.ClearCart(); var okResult = _controller.Get(); var items = Assert.IsType <List <ShoppingCartItemDto> >(okResult.Result); // Assert Assert.Empty(items); }