public void TestMatchTrianglePentagonalHexagonalMatch() { const int triangleIndex = 285; const int pentagonalIndex = 165; const int hexagonalIndex = 143; var numberGenerator = new NumberGenerator(); long triangleNumber = numberGenerator.GetTriangleNumber(triangleIndex); long pentagonalNumber = numberGenerator.GetPentagonalNumber(pentagonalIndex); long hexagonalNumber = numberGenerator.GetHexagonalNumber(hexagonalIndex); Assert.Equal(triangleNumber, pentagonalNumber); Assert.Equal(hexagonalNumber, pentagonalNumber); }