mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-24 00:15:10 +08:00
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
<%@ Template Language="C#" TargetLanguage="C#" Debug="True" Encoding="UTF-8" %>
|
|
|
|
<%@ Assembly Src="..\..\Common\Model.cs" %>
|
|
<%@ Assembly Src="..\..\Common\Extensions.cs" %>
|
|
|
|
<%@ Import Namespace="System.Collections.Generic" %>
|
|
<%@ Import Namespace="System.Linq" %>
|
|
<%@ Import Namespace="System.Text" %>
|
|
<%@ Import Namespace="System.Text.RegularExpressions" %>
|
|
<%@ Import Namespace="SchemaMapper" %>
|
|
|
|
<%@ Property Name="Entity" Type="SchemaMapper.Entity" %>
|
|
<%@ Property Name="Namespace" Type="System.String" %>
|
|
<%-- Safe类名 --%>
|
|
<% string SafeClassName = Entity.ClassName.ToSafeName(); %>
|
|
<%-- 描述 --%>
|
|
<% string Description = Entity.Description; %>
|
|
using Xunit;
|
|
using <%= Entity.GetNamespace(Namespace,"Domain","Models") %>;
|
|
|
|
namespace <%= string.Format("{0}.Test.Models.{1}",Namespace,Entity.TableSchema) %> {
|
|
/// <summary>
|
|
/// <%= Description %>测试
|
|
/// </summary>
|
|
public partial class <%= SafeClassName %>Test {
|
|
/// <summary>
|
|
/// <%= Description %>
|
|
/// </summary>
|
|
private <%= SafeClassName %> <%= SafeClassName.ToFieldName() %>;
|
|
|
|
/// <summary>
|
|
/// 测试初始化
|
|
/// </summary>
|
|
public <%= SafeClassName %>Test() {
|
|
<%= SafeClassName.ToFieldName() %> = Create();
|
|
}
|
|
}
|
|
} |