public void Tests(string input, int minDistance, string minDistWord) { int distance; Assert.Equal(minDistWord, Q06.FindNearestRepeats(out distance, input.Split())); Assert.Equal(minDistance, distance); }
public void NoRepeatsThrowsException() { int distance; string[] input = "aaa bbb c d eee fff g hhh jj".Split(); Assert.Throws <InvalidOperationException>(() => Q06.FindNearestRepeats(out distance, input)); }
public void Example() { string[] input = "All work and no play makes for no work no fun and no results".Split(); int distance; Assert.Equal("no", Q06.FindNearestRepeats(out distance, input)); Assert.Equal(2, distance); }