Exemple #1
0
 public void Test_1_handshake_to_wink()
 {
     Assert.That(SecretHandshake.Commands(1), Is.EqualTo(new[] { "wink" }));
 }
Exemple #2
0
 public void Close_your_eyes_for_100()
 {
     Assert.Equal(new[] { "close your eyes" }, SecretHandshake.Commands(4));
 }
Exemple #3
0
 public void Test_handshake_10011_to_double_blink_and_wink()
 {
     Assert.That(SecretHandshake.Commands(19), Is.EqualTo(new[] { "double blink", "wink" }));
 }
 public void Test_1000_handshake_to_close_your_eyes()
 {
     Assert.Equal(new[] { "jump" }, SecretHandshake.Commands(8));
 }
 public void Test_handshake_11111_to_all_commands_reversed()
 {
     Assert.Equal(new[] { "jump", "close your eyes", "double blink", "wink" }, SecretHandshake.Commands(31));
 }
Exemple #6
0
    public void Test_handshake_10011_to_double_blink_and_wink()
    {
        var handshake = new SecretHandshake(19);

        Assert.That(handshake.Commands(), Is.EqualTo(new string[] { "double blink", "wink" }));
    }
Exemple #7
0
    public void Test_1_handshake_to_wink()
    {
        var handshake = new SecretHandshake(1);

        Assert.That(handshake.Commands(), Is.EqualTo(new string[] { "wink" }));
    }
Exemple #8
0
 public void All_possible_actions()
 {
     Assert.Equal(new[] { "wink", "double blink", "close your eyes", "jump" }, SecretHandshake.Commands(15));
 }
Exemple #9
0
 public void Reverse_all_possible_actions()
 {
     Assert.Equal(new[] { "jump", "close your eyes", "double blink", "wink" }, SecretHandshake.Commands(31));
 }
Exemple #10
0
 public void Reversing_one_action_gives_the_same_action()
 {
     Assert.Equal(new[] { "jump" }, SecretHandshake.Commands(24));
 }
Exemple #11
0
 public void Reversing_no_actions_still_gives_no_actions()
 {
     Assert.Empty(SecretHandshake.Commands(16));
 }
Exemple #12
0
 public void Reverse_two_actions()
 {
     Assert.Equal(new[] { "double blink", "wink" }, SecretHandshake.Commands(19));
 }
Exemple #13
0
 public void Combine_two_actions()
 {
     Assert.Equal(new[] { "wink", "double blink" }, SecretHandshake.Commands(3));
 }
Exemple #14
0
 public void Jump_for_1000()
 {
     Assert.Equal(new[] { "jump" }, SecretHandshake.Commands(8));
 }
Exemple #15
0
    public void Test_10_handshake_to_double_blink()
    {
        var handshake = new SecretHandshake(2);

        Assert.That(handshake.Commands(), Is.EqualTo(new string[] { "double blink" }));
    }
Exemple #16
0
 public void Do_nothing_for_zero()
 {
     Assert.Empty(SecretHandshake.Commands(0));
 }
Exemple #17
0
    public void Test_1000_handshake_to_close_your_eyes()
    {
        var handshake = new SecretHandshake(8);

        Assert.That(handshake.Commands(), Is.EqualTo(new string[] { "jump" }));
    }
Exemple #18
0
 public void Wink_for_1()
 {
     Assert.Equal(new[] { "wink" }, SecretHandshake.Commands(1));
 }
Exemple #19
0
    public void Test_handshake_11111_to_all_commands_reversed()
    {
        var handshake = new SecretHandshake(31);

        Assert.That(handshake.Commands(), Is.EqualTo(new string[] { "jump", "close your eyes", "double blink", "wink" }));
    }
Exemple #20
0
 public void Test_10_handshake_to_double_blink()
 {
     Assert.That(SecretHandshake.Commands(2), Is.EqualTo(new[] { "double blink" }));
 }
 public void Test_10_handshake_to_double_blink()
 {
     Assert.Equal(new[] { "double blink" }, SecretHandshake.Commands(2));
 }
Exemple #22
0
 public void Test_1000_handshake_to_close_your_eyes()
 {
     Assert.That(SecretHandshake.Commands(8), Is.EqualTo(new[] { "jump" }));
 }
 public void Test_handshake_10011_to_double_blink_and_wink()
 {
     Assert.Equal(new[] { "double blink", "wink" }, SecretHandshake.Commands(19));
 }
Exemple #24
0
    public void Test_handshake_11_to_wink_and_double_blink()
    {
        var commands = SecretHandshake.Commands(3);

        Assert.That(commands, Is.EqualTo(new[] { "wink", "double blink" }));
    }
 public void Test_1_handshake_to_wink()
 {
     Assert.Equal(new[] { "wink" }, SecretHandshake.Commands(1));
 }
Exemple #26
0
 public void Double_blink_for_10()
 {
     Assert.Equal(new[] { "double blink" }, SecretHandshake.Commands(2));
 }