1
exercism fetch csharp proverb

ProverbTest.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 Xunit;

public class ProverbTest
{
    [Fact]
    public void Line_one()
    {
        Assert.Equal("For want of a nail the shoe was lost.", Proverb.Line(1));
    }

    [Fact(Skip = "Remove to run test")]
    public void Line_four()
    {
        Assert.Equal("For want of a rider the message was lost.", Proverb.Line(4));
    }

    [Fact(Skip = "Remove to run test")]
    public void Line_seven()
    {
        Assert.Equal("And all for the want of a horseshoe nail.", Proverb.Line(7));
    }

    [Fact(Skip = "Remove to run test")]
    public void All_lines()
    {
        const string expected = "For want of a nail the shoe was lost.\n" +
                                "For want of a shoe the horse was lost.\n" +
                                "For want of a horse the rider was lost.\n" +
                                "For want of a rider the message was lost.\n" +
                                "For want of a message the battle was lost.\n" +
                                "For want of a battle the kingdom was lost.\n" +
                                "And all for the want of a horseshoe nail.";

        Assert.Equal(expected, Proverb.AllLines());
    }
}