Пример #1
0
        public async Task Klarna_GetCheckoutOrderAsync_Returns_Success()
        {
            // Arrange
            CheckoutOrderResponse response = new CheckoutOrderResponse
            {
                StatusCode = 200
            };


            _cut.Setup(x => x.GetCheckoutOrderAsync(It.IsAny <string>())).ReturnsAsync(response);

            // Act
            var res = await _cut.Object.GetCheckoutOrderAsync("");

            // Assert
            Assert.AreEqual(res.StatusCode, response.StatusCode);
        }
Пример #2
0
        public async Task Klarna_CreateCheckoutOrderAsync_Returns_Success()
        {
            // Arrange
            var req = new Mock <ICheckoutOrderRequest>();

            CheckoutOrderResponse response = new CheckoutOrderResponse
            {
                StatusCode = 200
            };

            _cut.Setup(x => x.CreateCheckoutOrderAsync(It.IsAny <ICheckoutOrderRequest>())).ReturnsAsync(response);

            // Act
            var res = await _cut.Object.CreateCheckoutOrderAsync(req.Object);

            // Assert
            Assert.AreEqual(res.StatusCode, response.StatusCode);
        }