feat(tenpayv2): 导入项目

This commit is contained in:
RHQYZ
2022-01-20 23:20:03 +08:00
committed by GitHub
parent 47575857b6
commit 7205686f71
72 changed files with 4092 additions and 45 deletions

View File

@@ -0,0 +1,57 @@
using System.IO;
using System.Reflection;
using Xunit;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests
{
public class TestCase_CodeReviewAnalyzer
{
private Assembly SourceAssembly { get; } = Assembly.Load("SKIT.FlurlHttpClient.Wechat.TenpayV2");
[Fact(DisplayName = "代码评审:分析 API 模型命名")]
public void TestApiModelsNaming()
{
CodeStyleUtil.VerifyApiModelsNaming(SourceAssembly, out var ex);
if (ex != null)
throw ex;
Assert.Null(ex);
}
[Fact(DisplayName = "代码评审:分析 API 模型定义")]
public void TestApiModelsDefinition()
{
string workdir = Path.Combine(TestConfigs.ProjectTestDirectory, "ModelSamples");
CodeStyleUtil.VerifyApiModelsDefinition(SourceAssembly, workdir, out var ex);
if (ex != null)
throw ex;
Assert.Null(ex);
}
[Fact(DisplayName = "代码评审:分析 API 接口命名")]
public void TestApiExtensionsNaming()
{
CodeStyleUtil.VerifyApiExtensionsNaming(SourceAssembly, out var ex);
if (ex != null)
throw ex;
Assert.Null(ex);
}
[Fact(DisplayName = "代码评审:分析代码规范")]
public void TestCodeStyle()
{
string workdir = Path.Combine(TestConfigs.ProjectSourceDirectory);
CodeStyleUtil.VerifySourceCodeStyle(workdir, out var ex);
if (ex != null)
throw ex;
Assert.Null(ex);
}
}
}