Exemplo n.º 1
0
        public void shouldReturnAPerfectTree(int lines, String expected)
        {
            ChristmasTree tree = new ChristmasTree(lines);
            String result = tree.buildTree(lines);

            Assert.AreEqual(expected, result);
        }
        public void ShouldReturnA4BranchesAnd1TrunkWhenLevel4()
        {
            ChristmasTree xMasTree = new ChristmasTree(4);
            int numberOfBranche = xMasTree.NumberOfBranches;
            Assert.AreEqual(4, numberOfBranche);

            int numberOfTrunk = xMasTree.NumberOfTrunk;
            Assert.AreEqual(1, numberOfTrunk);
        }
 public void ShouldReturn2SpacesBeforeStarsOn1stBranchWhenLevel3()
 {
     ChristmasTree xMasTree = new ChristmasTree(3);
     int numberOfSpaces = xMasTree.GetNumberOfSpace(1);
     Assert.AreEqual(2, numberOfSpaces);
 }