-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathExercise003Tests.cs
More file actions
51 lines (41 loc) · 1.46 KB
/
Exercise003Tests.cs
File metadata and controls
51 lines (41 loc) · 1.46 KB
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
using NUnit.Framework;
using FluentAssertions;
namespace Exercises.Tests
{
public class Exercise003Tests
{
private Exercise003 Exercise003;
[SetUp]
public void Setup()
{
Exercise003 = new Exercise003();
}
[Test]
public void Given_Chocolate_Chip_GetIceCreamCode_Should_Return_Correct_Ice_Cream_Code()
{
string iceCreamFlavour = "Mint Chocolate Chip";
int expectedCode = 3;
Exercise003.IceCreamCode(iceCreamFlavour).Should().Be(expectedCode);
}
[Test]
public void Given_Mango_Sorbet_GetIceCreamCode_Should_Return_Correct_Ice_Cream_Code()
{
string iceCreamFlavour = "Mango Sorbet";
int expectedCode = 5;
Exercise003.IceCreamCode(iceCreamFlavour).Should().Be(expectedCode);
}
[Test]
public void Given_Raspberry_Ripple_GetIceCreamCode_Should_Return_Correct_Ice_Cream_Code()
{
string iceCreamFlavour = "Raspberry Ripple";
int expectedCode = 1;
Exercise003.IceCreamCode(iceCreamFlavour).Should().Be(expectedCode);
}
[Test]
public void Ice_Cream_Flavours_Should_Return_All_Flavours()
{
string[] expected = { "Pistachio", "Raspberry Ripple", "Vanilla", "Mint Chocolate Chip", "Chocolate", "Mango Sorbet" };
Exercise003.IceCreamFlavours.Should().Equal(expected);
}
}
}