public void GetTrolleyTotal_ShouldReturnTrolleyTotal()
        {
            var expected = "123";

            _mockHttpClientHelper.Setup(s => s.PostAsync <TrolleyEntity, string>(It.IsAny <string>(), It.IsAny <TrolleyEntity>())).ReturnsAsync(expected);

            var result = _sut.GetTrolleyTotal(It.IsAny <TrolleyEntity>()).Result;

            Assert.Equal(expected, result);
        }
Example #2
0
 public async Task <string> GetTrolleyTotal(TrolleyEntity trolleyEntity)
 {
     return(await _trolleyRepository.GetTrolleyTotal(trolleyEntity).ConfigureAwait(false));
 }