-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathEmployeeTest.cs
571 lines (489 loc) · 20.4 KB
/
EmployeeTest.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
using My.Hr.Common.Entities;
namespace My.Hr.Test.Apis;
[TestFixture, NonParallelizable]
public class EmployeeTest : UsingApiTester<Startup>
{
[OneTimeSetUp]
public void OneTimeSetUp() => TestSetUp.Default.SetUp();
#region Get
[Test]
public void A110_Get_NotFound()
{
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.NotFound)
.Run(a => a.GetAsync(404.ToGuid()));
}
[Test]
public void A120_Get_Found_NoAddress()
{
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.IgnoreChangeLog()
.IgnoreETag()
.ExpectValue(_ => new Employee
{
Id = 1.ToGuid(),
Email = "[email protected]",
FirstName = "Wendy",
LastName = "Jones",
Gender = "F",
Birthday = new DateTime(1985, 03, 18),
StartDate = new DateTime(2000, 12, 11),
PhoneNo = "(425) 612 8113"
})
.Run(a => a.GetAsync(1.ToGuid()));
}
[Test]
public void A130_Get_Found_WithAddress()
{
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.IgnoreChangeLog()
.IgnoreETag()
.ExpectValue(_ => new Employee
{
Id = 4.ToGuid(),
Email = "[email protected]",
FirstName = "Waylon",
LastName = "Smithers",
Gender = "M",
Birthday = new DateTime(1952, 02, 21),
StartDate = new DateTime(2001, 01, 22),
PhoneNo = "(428) 893 2793",
Address = new Address { Street1 = "8365 851 PL NE", City = "Redmond", State = "WA", PostCode = "98052" },
EmergencyContacts = new EmergencyContactCollection { new EmergencyContact { Id = 401.ToGuid(), FirstName = "Michael", LastName = "Manners", PhoneNo = "(234) 297 9834", Relationship = "FRD" } }
})
.Run(a => a.GetAsync(4.ToGuid()));
}
[Test]
public void A140_Get_Modified_NotModified()
{
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(1.ToGuid(), new HttpRequestOptions { ETag = TestSetUp.Default.ConcurrencyErrorETag })).Value!;
Assert.That(v, Is.Not.Null);
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.NotModified)
.Run(a => a.GetAsync(1.ToGuid(), new HttpRequestOptions { ETag = v.ETag }));
}
[Test]
public void A150_Get_IncludeRefDataText()
{
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(1.ToGuid(), new HttpRequestOptions { IncludeText = true})).Value!;
Assert.That(v, Is.Not.Null);
Assert.That(v.GenderText, Is.EqualTo("Female"));
}
[Test]
public void A160_Get_IncludeFields()
{
Agent<EmployeeAgent>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(1.ToGuid(), new HttpRequestOptions().Include(new string[] { "firstName", "lastName" })))
.AssertJson("{\"firstName\":\"Wendy\",\"lastName\":\"Jones\"}");
}
#endregion
#region GetByArgs
[Test]
public void A210_GetByArgs_All()
{
var v = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(null)).Value;
Assert.That(v, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(v!.Items, Is.Not.Null);
Assert.That(v.Items, Has.Count.EqualTo(3));
Assert.That(v.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Browne", "Jones", "Smithers" }));
});
}
[Test]
public void A220_GetByArgs_All_Paging()
{
var r = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { IsIncludeTerminated = true }, PagingArgs.CreateSkipAndTake(1,2)));
var v = r.Value;
Assert.That(v, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(v!.Items, Is.Not.Null);
Assert.That(v.Items, Has.Count.EqualTo(2));
Assert.That(v.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Jones", "Smith" }));
});
// Query again with etag and ensure not modified.
Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.NotModified)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { IsIncludeTerminated = true }, PagingArgs.CreateSkipAndTake(1, 2), new HttpRequestOptions { ETag = r.Response!.Headers!.ETag!.Tag }));
}
[Test]
public void A230_GetByArgs_FirstName()
{
var v = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { FirstName = "*a*" })).Value;
Assert.That(v, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(v!.Items, Is.Not.Null);
Assert.That(v.Items, Has.Count.EqualTo(2));
Assert.That(v.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Browne", "Smithers" }));
});
}
[Test]
public void A240_GetByArgs_LastName()
{
var v = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { LastName = "s*" })).Value;
Assert.That(v, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(v!.Items, Is.Not.Null);
Assert.That(v.Items, Has.Count.EqualTo(1));
Assert.That(v.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Smithers" }));
});
}
[Test]
public void A250_GetByArgs_LastName_IncludeTerminated()
{
var v = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { LastName = "s*", IsIncludeTerminated = true })).Value;
Assert.That(v, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(v!.Items, Is.Not.Null);
Assert.That(v.Items, Has.Count.EqualTo(2));
Assert.That(v.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Smith", "Smithers" }));
});
}
[Test]
public void A260_GetByArgs_Gender()
{
var v = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { Genders = new List<string?> { "F" } })).Value;
Assert.That(v, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(v!.Items, Is.Not.Null);
Assert.That(v.Items, Has.Count.EqualTo(2));
Assert.That(v.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Browne", "Jones" }));
});
}
[Test]
public void A270_GetByArgs_Empty()
{
Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { LastName = "s*", FirstName = "b*", Genders = new List<string?> { "F" } }))
.AssertJson("[]");
}
[Test]
public void A280_GetByArgs_FieldSelection()
{
var r = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { Genders = new List<string?> { "F" } }, requestOptions: new HttpRequestOptions().Include("firstname", "lastname")))
.AssertJson("[{\"firstName\":\"Rachael\",\"lastName\":\"Browne\"},{\"firstName\":\"Wendy\",\"lastName\":\"Jones\"}]");
}
[Test]
public void A290_GetByArgs_RefDataText()
{
var r = Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetByArgsAsync(new EmployeeArgs { Genders = new List<string?> { "F" } }, requestOptions: new HttpRequestOptions { IncludeText = true }));
Assert.That(r.Value, Is.Not.Null);
Assert.Multiple(() =>
{
Assert.That(r.Value!.Items, Is.Not.Null);
Assert.That(r.Value.Items, Has.Count.EqualTo(2));
Assert.That(r.Value.Items.Select(x => x.LastName).ToArray(), Is.EqualTo(new string[] { "Browne", "Jones" }));
Assert.That(r.Value.Items.Select(x => x.GenderText).ToArray(), Is.EqualTo(new string[] { "Female", "Female" }));
});
}
[Test]
public void A300_GetByArgs_ArgsError()
{
Agent<EmployeeAgent, EmployeeBaseCollectionResult>()
.ExpectStatusCode(HttpStatusCode.BadRequest)
.ExpectErrors("Genders contains one or more invalid items.")
.Run(a => a.GetByArgsAsync(new EmployeeArgs { Genders = new List<string?> { "Z" } }));
}
#endregion
#region Create
[Test]
public void B110_Create()
{
var v = new Employee
{
Email = "[email protected]",
FirstName = "Jill",
LastName = "Smith",
Gender = "F",
Birthday = new DateTime(1955, 10, 28),
StartDate = Cleaner.Clean(DateTime.Today, DateTimeTransform.DateOnly),
PhoneNo = "(456) 789 0123",
Address = new Address { Street1 = "2732 85 PL NE", City = "Bellevue", State = "WA", PostCode = "98101" },
EmergencyContacts = new EmergencyContactCollection { new EmergencyContact { FirstName = "Danny", LastName = "Keen", PhoneNo = "(234) 297 9834", Relationship = "FRD" } }
};
// Create value.
v = Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.Created)
.ExpectChangeLogCreated()
.ExpectETag()
.ExpectIdentifier()
.ExpectValue(_ => v, "emergencyContacts.id")
.ExpectEventValue(v, "my.hr.employee", "created", "value.id", "value.etag", "value.changeLog", "value.emergencyContacts.id")
.Run(a => a.CreateAsync(v)).Value!;
// Check the value was created properly.
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectValue(_ => v)
.Run(a => a.GetAsync(v.Id));
}
[Test]
public void B120_Create_Duplicate()
{
var v = new Employee
{
Email = "[email protected]",
FirstName = "Wendy",
LastName = "Jones",
Gender = "F",
Birthday = new DateTime(1985, 03, 18),
StartDate = new DateTime(2000, 12, 11),
PhoneNo = "(425) 612 8113"
};
// Create value.
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.Conflict)
.Run(a => a.CreateAsync(v));
}
#endregion
#region Update
[Test]
public void C110_Update_NotFound()
{
// Get an existing value.
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(4.ToGuid())).Value!;
// Try updating with an invalid identifier.
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.NotFound)
.Run(a => a.UpdateAsync(v, 404.ToGuid()));
}
[Test]
public void C120_Update_Concurrency()
{
// Get an existing value.
var id = 4.ToGuid();
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(id)).Value!;
// Try updating the value with an invalid eTag (if-match).
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.PreconditionFailed)
.Run(a => a.UpdateAsync(v, id, new HttpRequestOptions { ETag = TestSetUp.Default.ConcurrencyErrorETag }));
// Try updating the value with an invalid eTag.
v.ETag = TestSetUp.Default.ConcurrencyErrorETag;
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.PreconditionFailed)
.Run(a => a.UpdateAsync(v, id));
}
[Test]
public void C130_Update()
{
// Get an existing value.
var id = 4.ToGuid();
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(id)).Value!;
// Make some changes to the data.
v.FirstName += "X";
v.LastName += "Y";
v.Address!.Street2 = "Street 2";
v.EmergencyContacts![0].FirstName += "Y";
v.EmergencyContacts.Add(new EmergencyContact { FirstName = "Danny", LastName = "Keen", PhoneNo = "(234) 297 9834", Relationship = "FRD" });
// Update the value.
v = Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectChangeLogUpdated()
.ExpectETag(v.ETag)
.ExpectIdentifier()
.ExpectValue(_ => v, "emergencyContacts.id")
.ExpectEvent($"my.hr.employee", "updated")
.Run(a => a.UpdateAsync(v, id)).Value!;
// Check the value was updated properly.
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectValue(_ => v)
.Run(a => a.GetAsync(id));
}
[Test]
public void C140_Update_AlreadyTerminated()
{
// Get an existing value.
var id = 2.ToGuid();
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(id)).Value!;
// Make some changes to the data.
v.FirstName += "X";
v.LastName += "Y";
// Update the value.
var r = Agent<EmployeeAgent, Employee>()
.Run(a => a.UpdateAsync(v, id))
.Assert(HttpStatusCode.BadRequest, "Once an Employee has been Terminated the data can no longer be updated.");
}
#endregion
#region Patch
[Test]
public void D110_Patch_NotFound()
{
// Get an existing value.
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(4.ToGuid())).Value!;
// Try patching with an invalid identifier.
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.NotFound)
.Run(a => a.PatchAsync(HttpPatchOption.MergePatch, "{\"lastName\":\"Smithers\"}", 404.ToGuid()));
}
[Test]
public void D120_Patch_Concurrency()
{
// Get an existing value.
var id = 4.ToGuid();
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(id)).Value!;
// Try updating the value with an invalid eTag (if-match).
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.PreconditionFailed)
.Run(a => a.PatchAsync(HttpPatchOption.MergePatch, "{\"lastName\":\"Smithers\"}", id, new HttpRequestOptions { ETag = TestSetUp.Default.ConcurrencyErrorETag }));
// Try updating the value with an eTag header (json payload eTag is ignored).
v.ETag = TestSetUp.Default.ConcurrencyErrorETag;
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.PreconditionFailed)
.Run(a => a.PatchAsync(HttpPatchOption.MergePatch, $"{{\"lastName\":\"Smithers\",\"etag\":\"{TestSetUp.Default.ConcurrencyErrorETag}\"}}", id));
}
[Test]
public void D130_Patch()
{
// Get an existing value.
var id = 4.ToGuid();
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(id)).Value!;
// Make some changes to the data.
v.LastName = "Bartholomew";
v.EmergencyContacts = null;
// Update the value.
v = Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectChangeLogUpdated()
.ExpectETag(v.ETag)
.ExpectIdentifier()
.ExpectValue(_ => v)
.ExpectEvent($"my.hr.employee", "updated")
.Run(a => a.PatchAsync(HttpPatchOption.MergePatch, $"{{\"lastName\":\"{v.LastName}\",\"emergencyContacts\":null}}", id, new HttpRequestOptions { ETag = v.ETag })).Value;
// Check the value was updated properly.
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectValue(_ => v)
.Run(a => a.GetAsync(id));
}
#endregion
#region Delete
[Test]
public void E110_Delete()
{
var v = new Employee
{
Email = "[email protected]",
FirstName = "Jarrod",
LastName = "Jones",
Gender = "M",
Birthday = new DateTime(1928, 10, 28),
StartDate = DateTime.UtcNow.AddDays(1),
PhoneNo = "(456) 789 0123",
Address = new Address { Street1 = "2732 85 PL NE", City = "Bellevue", State = "WA", PostCode = "98101" },
EmergencyContacts = new EmergencyContactCollection { new EmergencyContact { FirstName = "Danny", LastName = "Keen", PhoneNo = "(234) 297 9834", Relationship = "FRD" } }
};
// Create an employee in the future.
v = Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.Created)
.ExpectEvent("my.hr.employee", "created")
.Run(a => a.CreateAsync(v)).Value!;
// Confirm employee exists.
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectNoEvents()
.Run(a => a.GetAsync(v.Id));
// Delete value.
Agent<EmployeeAgent>()
.ExpectStatusCode(HttpStatusCode.NoContent)
.ExpectEvent($"my.hr.employee", "deleted")
.Run(a => a.DeleteAsync(v.Id));
// Check value no longer exists.
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.NotFound)
.ExpectNoEvents()
.Run(a => a.GetAsync(v.Id));
// Delete again (should still be successful as a Delete is idempotent); note there should be no corresponding event as nothing actually happened.
Agent<EmployeeAgent>()
.ExpectStatusCode(HttpStatusCode.NoContent)
.ExpectNoEvents()
.Run(a => a.DeleteAsync(v.Id));
}
#endregion
#region Terminate
[Test]
public void F110_Terminate_NotFound()
{
Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.NotFound)
.Run(a => a.TerminateAsync(new TerminationDetail { Date = DateTime.Now, Reason = "RD" }, 404.ToGuid()));
}
[Test]
public void F120_Terminate_MoreThanOnce()
{
Agent<EmployeeAgent, Employee>()
.Run(a => a.TerminateAsync(new TerminationDetail { Date = DateTime.Now, Reason = "RD" }, 2.ToGuid()))
.Assert(HttpStatusCode.BadRequest, "An Employee can not be terminated more than once.");
}
[Test]
public void F130_Terminate_BeforeStart()
{
Agent<EmployeeAgent, Employee>()
.Run(a => a.TerminateAsync(new TerminationDetail { Date = new DateTime(1999, 12, 31), Reason = "RD" }, 1.ToGuid()))
.Assert(HttpStatusCode.BadRequest, "An Employee can not be terminated prior to their start date.");
}
[Test]
public void F140_Terminate()
{
var v = Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.Run(a => a.GetAsync(1.ToGuid())).Value!;
v.Termination = new TerminationDetail { Date = Cleaner.Clean(DateTime.Now, DateTimeTransform.DateOnly), Reason = "RD" };
v = Agent<EmployeeAgent, Employee>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectChangeLogUpdated()
.ExpectETag(v.ETag)
.ExpectIdentifier()
.ExpectValue(_ => v)
.ExpectEvent($"my.hr.employee", "terminated")
.Run(a => a.TerminateAsync(v.Termination, 1.ToGuid())).Value!;
Agent<EmployeeAgent, Employee?>()
.ExpectStatusCode(HttpStatusCode.OK)
.ExpectNoEvents()
.ExpectValue(_ => v)
.Run(a => a.GetAsync(1.ToGuid()));
}
#endregion
}