1
exercism fetch csharp secret-handshake

SecretHandshakeTest.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
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
// This file was auto-generated based on version 1.1.0 of the canonical data.

using Xunit;

public class SecretHandshakeTest
{
    [Fact]
    public void Wink_for_1()
    {
        Assert.Equal(new[] { "wink" }, SecretHandshake.Commands(1));
    }

    [Fact(Skip = "Remove to run test")]
    public void Double_blink_for_10()
    {
        Assert.Equal(new[] { "double blink" }, SecretHandshake.Commands(2));
    }

    [Fact(Skip = "Remove to run test")]
    public void Close_your_eyes_for_100()
    {
        Assert.Equal(new[] { "close your eyes" }, SecretHandshake.Commands(4));
    }

    [Fact(Skip = "Remove to run test")]
    public void Jump_for_1000()
    {
        Assert.Equal(new[] { "jump" }, SecretHandshake.Commands(8));
    }

    [Fact(Skip = "Remove to run test")]
    public void Combine_two_actions()
    {
        Assert.Equal(new[] { "wink", "double blink" }, SecretHandshake.Commands(3));
    }

    [Fact(Skip = "Remove to run test")]
    public void Reverse_two_actions()
    {
        Assert.Equal(new[] { "double blink", "wink" }, SecretHandshake.Commands(19));
    }

    [Fact(Skip = "Remove to run test")]
    public void Reversing_one_action_gives_the_same_action()
    {
        Assert.Equal(new[] { "jump" }, SecretHandshake.Commands(24));
    }

    [Fact(Skip = "Remove to run test")]
    public void Reversing_no_actions_still_gives_no_actions()
    {
        Assert.Empty(SecretHandshake.Commands(16));
    }

    [Fact(Skip = "Remove to run test")]
    public void All_possible_actions()
    {
        Assert.Equal(new[] { "wink", "double blink", "close your eyes", "jump" }, SecretHandshake.Commands(15));
    }

    [Fact(Skip = "Remove to run test")]
    public void Reverse_all_possible_actions()
    {
        Assert.Equal(new[] { "jump", "close your eyes", "double blink", "wink" }, SecretHandshake.Commands(31));
    }

    [Fact(Skip = "Remove to run test")]
    public void Do_nothing_for_zero()
    {
        Assert.Empty(SecretHandshake.Commands(0));
    }
}