Browse Source

fixed ordering test

pull/79/head
Galip Tolga Erdem 5 years ago
parent
commit
7e9ce85248
  1. 2
      services/ordering/test/EShopOnAbp.OrderingService.Application.Tests/Orders/OrderApplication_Tests.cs
  2. 2
      services/ordering/test/EShopOnAbp.OrderingService.EntityFrameworkCore.Tests/EntityFrameworkCore/Orders/OrderRepository_Tests.cs
  3. 11
      services/ordering/test/EShopOnAbp.OrderingService.TestBase/OrderingServiceTestDataSeedContributor.cs

2
services/ordering/test/EShopOnAbp.OrderingService.Application.Tests/Orders/OrderApplication_Tests.cs

@ -45,7 +45,7 @@ public class OrderApplication_Tests:OrderingServiceApplicationTestBase
var placedOrder = await _orderAppService.CreateAsync(new OrderCreateDto()
{
PaymentMethod = 1,
PaymentMethod = "paypal",
Address = new OrderAddressDto()
{
City = "Test City", Country = "Test Country", Description = "No Description", Street = "Test Street",

2
services/ordering/test/EShopOnAbp.OrderingService.EntityFrameworkCore.Tests/EntityFrameworkCore/Orders/OrderRepository_Tests.cs

@ -54,7 +54,7 @@ public class OrderRepository_Tests : SampleRepository_Tests<OrderingServiceEntit
units)>();
orderItems.Add((Guid.NewGuid(), "Test product", "Code:001", 15, 0, "", 1));
var createdOrder = await _orderManager.CreateOrderAsync(
1,
"paypal",
Guid.Parse("11CA0F6D-208E-441A-9F9B-3611C96E4383"),
"gterdem",
"gterdem@volosoft.com",

11
services/ordering/test/EShopOnAbp.OrderingService.TestBase/OrderingServiceTestDataSeedContributor.cs

@ -1,5 +1,4 @@
using System;
using System.Threading.Tasks;
using System.Threading.Tasks;
using EShopOnAbp.OrderingService.Orders;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
@ -30,7 +29,7 @@ namespace EShopOnAbp.OrderingService
private async Task SeedTestOrdersAsync()
{
await _orderManager.CreateOrderAsync(
1,
"paypal",
_testData.CurrentUserId,
_testData.CurrentUserName,
_testData.CurrentUserEmail,
@ -42,7 +41,7 @@ namespace EShopOnAbp.OrderingService
);
await _orderManager.CreateOrderAsync(
1, _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail,
"paypal", _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail,
_testProducts.GetRandomProducts(10),
_testData.Address.Street,
_testData.Address.City,
@ -51,7 +50,7 @@ namespace EShopOnAbp.OrderingService
);
await _orderManager.CreateOrderAsync(
1, _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail,
"paypal", _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail,
_testProducts.GetRandomProducts(2),
_testData.Address.Street,
_testData.Address.City,
@ -60,7 +59,7 @@ namespace EShopOnAbp.OrderingService
);
await _orderManager.CreateOrderAsync(
1, _testData.TestUserId, _testData.TestUserName, _testData.TestUserEmail,
"paypal", _testData.TestUserId, _testData.TestUserName, _testData.TestUserEmail,
_testProducts.GetRandomProducts(7),
_testData.Address.Street,
_testData.Address.City,

Loading…
Cancel
Save