-
Notifications
You must be signed in to change notification settings - Fork 0
/
TicketsTask_should.cs
36 lines (34 loc) · 1.08 KB
/
TicketsTask_should.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
using NUnit.Framework;
using System.Numerics;
namespace Tickets
{
[TestFixture]
public class TicketsTask_should
{
private void MakeTest(int halfLen, int totalSum, string answer)
{
var result = BigInteger.Parse(answer);
Assert.AreEqual(result, TicketsTask.Solve(halfLen, totalSum));
}
[Test]
public void Test1() { MakeTest(2, 2, "4"); }
[Test]
public void Test2() { MakeTest(2, 5, "0"); }
[Test]
public void Test3() { MakeTest(1, 18, "1"); }
[Test]
public void Test4() { MakeTest(2, 20, "81"); }
[Test]
public void Test5() { MakeTest(3, 54, "1"); }
[Test]
public void Test6() { MakeTest(10, 10, "4008004"); }
[Test]
public void Test7() { MakeTest(20, 20, "401200499400100"); }
[Test]
public void Test8() { MakeTest(3, 52, "9"); }
[Test]
public void Test9() { MakeTest(50, 50, "1228576490354119571810717714807944388004"); }
[Test]
public void Test10() { MakeTest(1, 11, "0"); }
}
}