-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathUnitTests.cs
More file actions
43 lines (33 loc) · 772 Bytes
/
UnitTests.cs
File metadata and controls
43 lines (33 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System.Diagnostics;
using AutoFixture.Xunit2;
namespace AutoFixtureXUnit;
public class UnitTest1
{
[Theory]
[AutoData]
public void TestOne(string name)
{
}
[Theory]
[InlineAutoData]
[InlineAutoData(31)]
[InlineAutoData(31, "Steven")]
public void TestTwo(int age, string name)
{
var sut = new MyFooService();
var result = sut.MyCall(name, age);
Assert.NotNull(result);
}
[Theory]
[InlineAutoData]
public void TestThree(string name, MyFooService sut)
{
var result = sut.MyCall(name);
Assert.NotNull(result);
}
}
public class MyFooService
{
public string MyCall(string name) => name;
public string MyCall(string name, int age) => name + age;
}