-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathUsage.cs
32 lines (25 loc) · 781 Bytes
/
Usage.cs
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
// ReSharper disable UnusedVariable
// ReSharper disable UnusedParameter.Local
public class Usage
{
public static void Run()
{
#region usage
var items = TheNaughtyStrings.All.Take(10);
var emoji = TheNaughtyStrings.Emoji.Take(10);
#endregion
#region bogususage
var faker = new Faker<Target>()
.RuleFor(u => u.Property1, (f, u) => f.Naughty().String())
.RuleFor(u => u.Property2, (f, u) => f.Naughty().Emoji());
var target = faker.Generate();
Debug.WriteLine(target.Property1);
Debug.WriteLine(target.Property2);
#endregion
}
}
public class Target
{
public string Property1 = null!;
public string Property2 = null!;
}