Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion exercises/anagram/AnagramTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was auto-generated based on version 1.4.1 of the canonical data.
// This file was auto-generated based on version 1.5.0 of the canonical data.

using Xunit;

Expand Down Expand Up @@ -47,6 +47,15 @@ public void Detects_three_anagrams()
Assert.Equal(expected, sut.FindAnagrams(candidates));
}

[Fact(Skip = "Remove to run test")]
public void Detects_multiple_anagrams_with_different_case()
{
var candidates = new[] { "Eons", "ONES" };
var sut = new Anagram("nose");
var expected = new[] { "Eons", "ONES" };
Assert.Equal(expected, sut.FindAnagrams(candidates));
}

[Fact(Skip = "Remove to run test")]
public void Does_not_detect_non_anagrams_with_identical_checksum()
{
Expand Down Expand Up @@ -105,4 +114,13 @@ public void Words_are_not_anagrams_of_themselves_case_insensitive_()
var sut = new Anagram("BANANA");
Assert.Empty(sut.FindAnagrams(candidates));
}

[Fact(Skip = "Remove to run test")]
public void Words_other_than_themselves_can_be_anagrams()
{
var candidates = new[] { "Listen", "Silent", "LISTEN" };
var sut = new Anagram("LISTEN");
var expected = new[] { "Silent" };
Assert.Equal(expected, sut.FindAnagrams(candidates));
}
}
16 changes: 15 additions & 1 deletion exercises/circular-buffer/CircularBufferTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was auto-generated based on version 1.1.0 of the canonical data.
// This file was auto-generated based on version 1.2.0 of the canonical data.

using System;
using Xunit;
Expand Down Expand Up @@ -132,4 +132,18 @@ public void Overwrite_replaces_the_oldest_item_remaining_in_buffer_following_a_r
Assert.Equal(4, buffer.Read());
Assert.Equal(5, buffer.Read());
}

[Fact(Skip = "Remove to run test")]
public void Initial_clear_does_not_affect_wrapping_around()
{
var buffer = new CircularBuffer<int>(capacity: 2);
buffer.Clear();
buffer.Write(1);
buffer.Write(2);
buffer.Overwrite(3);
buffer.Overwrite(4);
Assert.Equal(3, buffer.Read());
Assert.Equal(4, buffer.Read());
Assert.Throws<InvalidOperationException>(() => buffer.Read());
}
}