public void GetTriangleByRowAndColumn_A1() { var triangle = TestImageGrid.GetTriangleByRowAndColumn("A", "1"); var expectedName = "A1"; var expectedNumberOfCoordinates = 3; triangle.Name.Should().Be(expectedName); triangle.Vertices.Should().NotBeEmpty() .And.HaveCount(expectedNumberOfCoordinates); }
public Triangle GetTriangle(string row, string col) { Triangle triangle = null; try { var imageGrid = new ImageGrid(); triangle = imageGrid.GetTriangleByRowAndColumn(row, col); } catch (ArgumentException argEx) //also covers ArgumentOutOfRangeException as descendant { HandleArgumentErrors($"row {row}, col {col}", argEx); } return(triangle); }