forked from EllieJudge/c_sharp_coding_exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise002Test.cs
More file actions
26 lines (24 loc) · 797 Bytes
/
Copy pathExercise002Test.cs
File metadata and controls
26 lines (24 loc) · 797 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
using Xunit;
using TechReturners.Exercises;
namespace TechReturners.Tests
{
public class Exercise002Test
{
[Fact]
public void CheckIsFromManchester()
{
Person p1 = new Person("Peter", "Smith", "Manchester", 23);
Person p2 = new Person("Susan", "Farmer", "Leeds", 23);
Assert.True(Exercise002.IsFromManchester(p1));
Assert.False(Exercise002.IsFromManchester(p2));
}
[Fact]
public void CheckCanWatchFilm()
{
Person p1 = new Person("Peter", "Smith", "Manchester", 17);
Person p2 = new Person("Susan", "Farmer", "Leeds", 18);
Assert.False(Exercise002.CanWatchFilm(p1, 18));
Assert.True(Exercise002.CanWatchFilm(p2, 15));
}
}
}