-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay06Task1Tests.cs
More file actions
87 lines (72 loc) · 1.14 KB
/
Day06Task1Tests.cs
File metadata and controls
87 lines (72 loc) · 1.14 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using FluentAssertions;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AdventOfCode2020.Tests
{
[TestFixture]
public class Day06Task1Tests
{
Day06Task1 _solver => new Day06Task1();
[Test]
public void splits_to_groups()
{
var input =
@"abc
a
b
c
ab
ac
a
a
a
a
b";
var result = _solver.SplitToGroups(input);
result.Should().Contain(new[]
{
"abc",
@"a
b
c",
@"ab
ac",
@"a
a
a
a",
"b"
});
}
[Test]
public void sums_yeses_to_11()
{
var input =
@"abc
a
b
c
ab
ac
a
a
a
a
b";
var result = _solver.Solve(input);
result.Should().Be(11);
}
[Test]
public void sums_yeses_to_6457()
{
var input = File.ReadAllText("Files\\Day06.txt");
var result = _solver.Solve(input);
result.Should().Be(6457);
}
}
}