XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.XUnit

【DLL】提供方便快捷的测试,无需编写Main方法,可直接添加特性在类或方法上进行测试

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension.NetCore.XUnit

修改README文档格式

ae5fdc5
XFE工作室室长 <mail@xfegzs.com>
提交于

代码差异

1 个文件 +61 -61
Modified README.md +61 -61
@@ -16,14 +16,14 @@ using XFE各类拓展.NetCore.XUnit;
16 16 //可添加多个测试用例
17 17 public class TestClass
18 18 {
19 [MTest]
20 //[MTest]
21 //[MTest]
22 //可添加多个测试用例
23 public void TestMethod()
24 {
25 Console.WriteLine("Hello World!");
26 }
19 [MTest]
20 //[MTest]
21 //[MTest]
22 //可添加多个测试用例
23 public void TestMethod()
24 {
25 Console.WriteLine("Hello World!");
26 }
27 27 }
28 28 ```
29 29
@@ -37,13 +37,13 @@ using XFE各类拓展.NetCore.XUnit;
37 37 [CTest]
38 38 public class TestClass
39 39 {
40 [MTest(1, 2)]
41 [MTest(2, 3)]
42 [MTest(3, 4)]
43 public void TestMethod(int a, int b)
44 {
45 Console.WriteLine(a + b);
46 }
40 [MTest(1, 2)]
41 [MTest(2, 3)]
42 [MTest(3, 4)]
43 public void TestMethod(int a, int b)
44 {
45 Console.WriteLine(a + b);
46 }
47 47 }
48 48 ```
49 49
@@ -57,12 +57,12 @@ using XFE各类拓展.NetCore.XUnit;
57 57 [CTest]
58 58 public class TestClass : XFECode
59 59 {
60 [MTest(1, 2)]
61 [MTest(2, 3)]
62 public void TestMethod(int a, int b)
63 {
64 Assert(a + b == 3, "不等于3");
65 }
60 [MTest(1, 2)]
61 [MTest(2, 3)]
62 public void TestMethod(int a, int b)
63 {
64 Assert(a + b == 3, "不等于3");
65 }
66 66 }
67 67 ```
68 68
@@ -76,12 +76,12 @@ using XFE各类拓展.NetCore.XUnit;
76 76 [CTest]
77 77 public class TestClass
78 78 {
79 [MTest(1, 2)]
80 [MTest(3, 4)]
81 public void TestMethod(int a, int b)
82 {
83 XFECode.Assert(a + b == 3, "不等于3");
84 }
79 [MTest(1, 2)]
80 [MTest(2, 3)]
81 public void TestMethod(int a, int b)
82 {
83 XFECode.Assert(a + b == 3, "不等于3");
84 }
85 85 }
86 86 ```
87 87
@@ -95,13 +95,13 @@ using XFE各类拓展.NetCore.XUnit;
95 95 [CTest]
96 96 public class TestClass
97 97 {
98 [MRTest(1, 2, 3)]
99 [MRTest(2, 3, 5)]
100 [MRTest(3, 4, 7)]
101 public int TestMethod(int a, int b)
102 {
103 return a + b;
104 }
98 [MRTest(1, 2, 3)]
99 [MRTest(2, 3, 5)]
100 [MRTest(3, 4, 7)]
101 public int TestMethod(int a, int b)
102 {
103 return a + b;
104 }
105 105 }
106 106 ```
107 107
@@ -115,11 +115,11 @@ using XFE各类拓展.NetCore.XUnit;
115 115 [CTest("这是一个测试类")]
116 116 public class TestClass
117 117 {
118 [MNTest("这是一个测试方法")]
119 public void TestMethod()
120 {
121 Console.WriteLine("Hello World!");
122 }
118 [MNTest("这是一个测试方法")]
119 public void TestMethod()
120 {
121 Console.WriteLine("Hello World!");
122 }
123 123 }
124 124 ```
125 125
@@ -133,11 +133,11 @@ using XFE各类拓展.NetCore.XUnit;
133 133 [CTest("这是一个测试类")]
134 134 public class TestClass
135 135 {
136 [MNRTest("这是一个测试方法", 1, 2, 3)]
137 public int TestMethod(int a, int b)
138 {
139 return a + b;
140 }
136 [MNRTest("这是一个测试方法", 1, 2, 3)]
137 public int TestMethod(int a, int b)
138 {
139 return a + b;
140 }
141 141 }
142 142 ```
143 143
@@ -151,18 +151,18 @@ using XFE各类拓展.NetCore.XUnit;
151 151 [CTest]
152 152 public class TestClass
153 153 {
154 string initWord;
155 [SetUp]
156 public void SetUp()
157 {
158 initWord = "Hello World!";
159 }
160
161 [MTest]
162 public void TestMethod()
163 {
164 Console.WriteLine(initWord);
165 }
154 string initWord;
155 [SetUp]
156 public void SetUp()
157 {
158 initWord = "Hello World!";
159 }
160
161 [MTest]
162 public void TestMethod()
163 {
164 Console.WriteLine(initWord);
165 }
166 166 }
167 167 ```
168 168
@@ -175,10 +175,10 @@ using XFE各类拓展.NetCore.XUnit;
175 175
176 176 public class TestClass
177 177 {
178 [SMTest]
179 public static void TestMethod()
180 {
181 Console.WriteLine("Hello World!");
182 }
178 [SMTest]
179 public static void TestMethod()
180 {
181 Console.WriteLine("Hello World!");
182 }
183 183 }
184 184 ```