public void No_rectangles() { var strings = new[] { " " }; Assert.Equal(0, Rectangles.Count(strings)); }
public void Number_1x1_square_is_counted() { var strings = new[] { "++", "++" }; Assert.Equal(1, Rectangles.Count(strings)); }
public void Rectangle_of_height_1_is_counted() { var strings = new[] { "+--+", "+--+" }; Assert.Equal(1, Rectangles.Count(strings)); }
public void One_rectangle() { var strings = new[] { "+-+", "| |", "+-+" }; Assert.Equal(1, Rectangles.Count(strings)); }
public void Rectangle_of_width_1_is_counted() { var strings = new[] { "++", "||", "++" }; Assert.Equal(1, Rectangles.Count(strings)); }
public void One_rectangle() { var input = new[] { "+-+", "| |", "+-+" }; Assert.That(Rectangles.Count(input), Is.EqualTo(1)); }
public void One_rectangle() { var input = new[] { "+-+", "| |", "+-+" }; Assert.Equal(1, Rectangles.Count(input)); }
public void Two_rectangles_without_shared_parts() { var strings = new[] { " +-+", " | |", "+-+-+", "| | ", "+-+ " }; Assert.Equal(2, Rectangles.Count(strings)); }
public void Corner_is_required_for_a_rectangle_to_be_complete() { var strings = new[] { "+------+----+", "| | |", "+------+ |", "| | |", "+---+-------+" }; Assert.Equal(2, Rectangles.Count(strings)); }
public void Rectangles_can_be_of_different_sizes() { var strings = new[] { "+------+----+", "| | |", "+---+--+ |", "| | |", "+---+-------+" }; Assert.Equal(3, Rectangles.Count(strings)); }
public void Only_complete_rectangles_are_counted() { var strings = new[] { " +-+", " |", "+-+-+", "| | -", "+-+-+" }; Assert.Equal(1, Rectangles.Count(strings)); }
public void Five_rectangles_with_shared_parts() { var strings = new[] { " +-+", " | |", "+-+-+", "| | |", "+-+-+" }; Assert.Equal(5, Rectangles.Count(strings)); }
public void Rectangles_can_be_of_different_sizes() { var input = new[] { "+------+----+", "| | |", "+---+--+ |", "| | |", "+---+-------+" }; Assert.That(Rectangles.Count(input), Is.EqualTo(3)); }
public void Only_complete_rectangles_are_counted() { var input = new[] { " +-+", " |", "+-+-+", "| | -", "+-+-+" }; Assert.That(Rectangles.Count(input), Is.EqualTo(1)); }
public void Corner_is_required_for_a_rectangle_to_be_complete() { var input = new[] { "+------+----+", "| | |", "+------+ |", "| | |", "+---+-------+" }; Assert.That(Rectangles.Count(input), Is.EqualTo(2)); }
public void Five_rectangles_with_shared_parts() { var input = new[] { " +-+", " | |", "+-+-+", "| | |", "+-+-+" }; Assert.That(Rectangles.Count(input), Is.EqualTo(5)); }
public void Large_input_with_many_rectangles() { var input = new[] { "+---+--+----+", "| +--+----+", "+---+--+ |", "| +--+----+", "+---+--+--+-+", "+---+--+--+-+", "+------+ | |", " +-+" }; Assert.That(Rectangles.Count(input), Is.EqualTo(60)); }
public void Large_input_with_many_rectangles() { var strings = new[] { "+---+--+----+", "| +--+----+", "+---+--+ |", "| +--+----+", "+---+--+--+-+", "+---+--+--+-+", "+------+ | |", " +-+" }; Assert.Equal(60, Rectangles.Count(strings)); }
public void No_rectangles() { var input = new[] { " " }; Assert.Equal(0, Rectangles.Count(input)); }
public void No_rows() { var input = new string[0]; Assert.That(Rectangles.Count(input), Is.EqualTo(0)); }
public void No_rows() { var input = new string[0]; Assert.Equal(0, Rectangles.Count(input)); }
public void No_rectangles() { var input = new[] { " " }; Assert.That(Rectangles.Count(input), Is.EqualTo(0)); }
public void No_rows() { var strings = Array.Empty <string>(); Assert.Equal(0, Rectangles.Count(strings)); }
public void No_rows() { var strings = new string[0]; Assert.Equal(0, Rectangles.Count(strings)); }