-
-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy pathDeveloperPrivilegesTests.cs
52 lines (46 loc) · 1.74 KB
/
DeveloperPrivilegesTests.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
using Exercism.Tests;
public class DeveloperPrivilegesTests
{
[Fact]
[Task(1)]
public void GetAdmin()
{
var authenticator = new Authenticator();
var admin = authenticator.Admin;
Assert.NotNull(admin);
Assert.Equal("[email protected]", admin.Email);
Assert.Equal("green", admin.FacialFeatures.EyeColor);
Assert.Equal(0.9M, admin.FacialFeatures.PhiltrumWidth, precision: 1);
Assert.Equal("Chanakya", admin.NameAndAddress[0]);
Assert.Equal("Mumbai", admin.NameAndAddress[1]);
Assert.Equal("India", admin.NameAndAddress[2]);
}
[Fact]
[Task(2)]
public void GetBertrand()
{
var authenticator = new Authenticator();
var bertrand = authenticator.Developers?["Bertrand"];
Assert.NotNull(bertrand);
Assert.Equal("[email protected]", bertrand.Email);
Assert.Equal("blue", bertrand.FacialFeatures.EyeColor);
Assert.Equal(0.8M, bertrand.FacialFeatures.PhiltrumWidth, precision: 1);
Assert.Equal("Bertrand", bertrand.NameAndAddress[0]);
Assert.Equal("Paris", bertrand.NameAndAddress[1]);
Assert.Equal("France", bertrand.NameAndAddress[2]);
}
[Fact]
[Task(3)]
public void GetAnders()
{
var authenticator = new Authenticator();
var anders = authenticator.Developers?["Anders"];
Assert.NotNull(anders);
Assert.Equal("[email protected]", anders.Email);
Assert.Equal("brown", anders.FacialFeatures.EyeColor);
Assert.Equal(0.85M, anders.FacialFeatures.PhiltrumWidth, precision: 2);
Assert.Equal("Anders", anders.NameAndAddress[0]);
Assert.Equal("Redmond", anders.NameAndAddress[1]);
Assert.Equal("USA", anders.NameAndAddress[2]);
}
}