-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEuler002.Test.cs
More file actions
31 lines (25 loc) · 621 Bytes
/
Euler002.Test.cs
File metadata and controls
31 lines (25 loc) · 621 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
27
28
29
namespace algorithm_exercises_csharp_test.hackerrank.projecteuler;
using algorithm_exercises_csharp.hackerrank.projecteuler;
[TestClass]
public class Euler002Test
{
public class Euler002TestCase
{
public int N { get; set; }
public int Answer { get; set; }
}
private static readonly Euler002TestCase[] tests = [
new() { N = 10, Answer = 10 },
new() { N = 100, Answer = 44 }
];
[TestMethod]
public void euler002Test()
{
int result;
foreach (Euler002TestCase test in tests)
{
result = Euler002.euler002(test.N);
Assert.AreEqual(test.Answer, result);
}
}
}