Browse Source

Add Payment.Admin.Application.Tests project

pull/69/head
Engincan VESKE 5 years ago
parent
commit
24934382fc
  1. 7
      modules/payment/Payment.sln
  2. 3
      modules/payment/test/Payment.Admin.Application.Tests/FodyWeavers.xml
  3. 30
      modules/payment/test/Payment.Admin.Application.Tests/FodyWeavers.xsd
  4. 15
      modules/payment/test/Payment.Admin.Application.Tests/Payment.Admin.Application.Tests.csproj
  5. 7
      modules/payment/test/Payment.Admin.Application.Tests/PaymentAdminApplicationTestBase.cs
  6. 13
      modules/payment/test/Payment.Admin.Application.Tests/PaymentAdminApplicationTestModule.cs
  7. 24
      modules/payment/test/Payment.Admin.Application.Tests/PaymentRequests/PaymentRequestAdminAppService_Tests.cs

7
modules/payment/Payment.sln

@ -55,6 +55,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.Admin.HttpApi.Clien
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.Admin.Blazor", "src\Payment.Admin.Blazor\Payment.Admin.Blazor.csproj", "{7C6D6C96-0816-43F3-81C8-44CBC18434DE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.Admin.Application.Tests", "test\Payment.Admin.Application.Tests\Payment.Admin.Application.Tests.csproj", "{E31DBDFE-1CC7-4E1B-B65C-C3810BF85981}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -133,6 +135,10 @@ Global
{7C6D6C96-0816-43F3-81C8-44CBC18434DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C6D6C96-0816-43F3-81C8-44CBC18434DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C6D6C96-0816-43F3-81C8-44CBC18434DE}.Release|Any CPU.Build.0 = Release|Any CPU
{E31DBDFE-1CC7-4E1B-B65C-C3810BF85981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E31DBDFE-1CC7-4E1B-B65C-C3810BF85981}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E31DBDFE-1CC7-4E1B-B65C-C3810BF85981}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E31DBDFE-1CC7-4E1B-B65C-C3810BF85981}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -162,6 +168,7 @@ Global
{046100DA-71ED-43C5-8C33-D424D678DBEA} = {5B39D229-146D-423E-9E50-91471851824E}
{A791943D-3F0B-41E3-AE73-15A60180B4A5} = {5B39D229-146D-423E-9E50-91471851824E}
{7C6D6C96-0816-43F3-81C8-44CBC18434DE} = {5B39D229-146D-423E-9E50-91471851824E}
{E31DBDFE-1CC7-4E1B-B65C-C3810BF85981} = {FC718EF0-43EB-4767-9578-95FA0B3727A5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}

3
modules/payment/test/Payment.Admin.Application.Tests/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
modules/payment/test/Payment.Admin.Application.Tests/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

15
modules/payment/test/Payment.Admin.Application.Tests/Payment.Admin.Application.Tests.csproj

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Payment.Admin.Application\Payment.Admin.Application.csproj" />
<ProjectReference Include="..\Payment.Domain.Tests\Payment.Domain.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
</ItemGroup>
</Project>

7
modules/payment/test/Payment.Admin.Application.Tests/PaymentAdminApplicationTestBase.cs

@ -0,0 +1,7 @@
namespace Payment.Admin.Application.Tests
{
public abstract class PaymentAdminApplicationTestBase : PaymentTestBase<PaymentAdminApplicationTestModule>
{
}
}

13
modules/payment/test/Payment.Admin.Application.Tests/PaymentAdminApplicationTestModule.cs

@ -0,0 +1,13 @@
using Volo.Abp.Modularity;
namespace Payment.Admin.Application.Tests
{
[DependsOn(
typeof(PaymentDomainTestModule),
typeof(PaymentAdminApplicationModule)
)]
public class PaymentAdminApplicationTestModule : AbpModule
{
}
}

24
modules/payment/test/Payment.Admin.Application.Tests/PaymentRequests/PaymentRequestAdminAppService_Tests.cs

@ -0,0 +1,24 @@
using System.Threading.Tasks;
using Payment.Admin.Payments;
using Shouldly;
using Xunit;
namespace Payment.Admin.Application.Tests.PaymentRequests
{
public class PaymentRequestAdminAppService_Tests : PaymentAdminApplicationTestBase
{
private readonly IPaymentRequestAdminAppService _paymentRequestAdminAppService;
public PaymentRequestAdminAppService_Tests()
{
_paymentRequestAdminAppService = GetRequiredService<IPaymentRequestAdminAppService>();
}
[Fact]
public async Task GetListAsync()
{
var paymentRequests = await _paymentRequestAdminAppService.GetListAsync(new PaymentRequestGetListInput());
paymentRequests.Items.ShouldNotBeNull();
}
}
}
Loading…
Cancel
Save