Ejemplo n.º 1
0
            public void CreatesSameDescription()
            {
                WordHexagon hexagon = new WordHexagon(4);

                hexagon.SetHorizontalLineAtIndex(2, "knight");
                hexagon.SetDiagonalLineAtIndex(1, "kaboo");
                hexagon.SetDiagonalLineAtIndex(6, "ashed");

                WordHexagon hexagonCopy = new WordHexagon(hexagon);

                Assert.AreEqual(hexagon.ToString(), hexagonCopy.ToString());
            }
Ejemplo n.º 2
0
            public void ReturnsExpectedString()
            {
                WordHexagon hexagon = new WordHexagon();

                hexagon.SetHorizontalLineAtIndex(2, "night");
                hexagon.SetDiagonalLineAtIndex(2, "angel");
                hexagon.SetHorizontalLineAtIndex(1, "ante");

                const string EXPECTED_STRING =
                    @"  A _ _
 A N T E
N I G H T
 _ _ E _
  _ _ L
Unique words: night, angel, ante
";

                Assert.AreEqual(EXPECTED_STRING, hexagon.ToString());
            }
Ejemplo n.º 3
0
            public void ReturnsExpectedString()
            {
                WordHexagon hexagon = new WordHexagon(4);

                hexagon.SetHorizontalLineAtIndex(2, "knight");
                hexagon.SetDiagonalLineAtIndex(1, "kaboo");
                hexagon.SetDiagonalLineAtIndex(6, "ashed");

                const string EXPECTED_STRING =
                    @"   _ _ A _
  _ _ _ S _
 K N I G H T
_ A _ * _ E _
 _ B _ _ _ D
  _ O _ _ _
   _ O _ _
Unique words: knight, kaboo, ashed
";

                Assert.AreEqual(EXPECTED_STRING, hexagon.ToString());
            }