-
Notifications
You must be signed in to change notification settings - Fork 1
/
MavenlinkTests.Deserialize.cs
87 lines (81 loc) · 1.64 KB
/
MavenlinkTests.Deserialize.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using FluentSerializer.Json;
using FluentSerializer.Json.Converter.DefaultJson.Extensions;
using FluentSerializer.UseCase.Mavenlink.Models;
using FluentSerializer.UseCase.Mavenlink.Models.Entities;
namespace FluentSerializer.UseCase.Mavenlink;
public sealed partial class MavenlinkTests
{
private static readonly User JohnDoe = new()
{
Id = "U1",
Name = "John Doe",
Age = 22,
AccountMembershipId = "UA1",
AccountMembership = new()
{
Id = "UA1",
LineManagerId = "U2"
},
CustomFields = new()
{
new CustomFieldValue
{
CustomFieldId = "C9",
CustomFieldName = "nickname",
DisplayValue = "JD",
Id = "CV1",
SubjectId = "U1",
SubjectType = CustomFieldSubjectType.User,
Type = "string",
Value = JsonBuilder.Value("JD".WrapString())
},
new CustomFieldValue
{
CustomFieldId = "C1",
CustomFieldName = "Office",
DisplayValue = "HQ",
Id = "CV3",
SubjectId = "U1",
SubjectType = CustomFieldSubjectType.User,
Type = "string",
Value = JsonBuilder.Value("HQ".WrapString())
}
}
};
private static readonly User JaneDoe = new()
{
Id = "U2",
Name = "Jane Doe",
Age = 22,
AccountMembershipId = "UA2",
AccountMembership = new()
{
Id = "UA2",
LineManagerId = null
}
};
private static readonly User JanetDoe = new()
{
Id = "U3",
Name = "Janet Doe",
Age = 22,
AccountMembershipId = "UA3",
AccountMembership = new()
{
Id = "UA3",
LineManagerId = "U5"
}
};
private static readonly Response<User> UserResponseExample = new()
{
Count = 1,
CurrentPage = 1,
PageCount = 1,
Data = new()
{
JohnDoe,
JaneDoe,
JanetDoe
}
};
}