public void testScoreSheetPrintNoTotals()
 {
     ScoreSheet scoreSheet = new ScoreSheet();
     scoreSheet.setupGame("Yacht");
     List<ScoringCategory> cats = scoreSheet.printScoreSheet();
     foreach (ScoringCategory cat in cats)
     {
         Assert.AreNotEqual("Upper Bonus", cat.Name);
         Assert.AreNotEqual("Bonus Yahtzee Total", cat.Name);
     }
 }
        public void testScoreSheetPrintTotals()
        {
            ScoreSheet scoreSheet = new ScoreSheet();
            scoreSheet.setupGame("Yahtzee");
            List<ScoringCategory> cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(0, cats[6].FinalScore);
            Assert.AreEqual(0, cats[7].FinalScore);
            Assert.AreEqual(0, cats[15].FinalScore);
            Assert.AreEqual(0, cats[16].FinalScore);
            Assert.AreEqual(0, cats[17].FinalScore);

            scoreSheet.Score("Sixes", new DieSet(6, 6, 6, 6, 5));
            cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(24, cats[6].FinalScore);
            Assert.AreEqual(0, cats[7].FinalScore);
            Assert.AreEqual(0, cats[15].FinalScore);
            Assert.AreEqual(0, cats[16].FinalScore);
            Assert.AreEqual(24, cats[17].FinalScore);

            scoreSheet.Score("Fives", new DieSet(5, 5, 5, 5, 6));
            cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(44, cats[6].FinalScore);
            Assert.AreEqual(0, cats[7].FinalScore);
            Assert.AreEqual(0, cats[15].FinalScore);
            Assert.AreEqual(0, cats[16].FinalScore);
            Assert.AreEqual(44, cats[17].FinalScore);

            scoreSheet.Score("Fours", new DieSet(4, 4, 4, 4, 6));
            cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(60, cats[6].FinalScore);
            Assert.AreEqual(0, cats[7].FinalScore);
            Assert.AreEqual(0, cats[15].FinalScore);
            Assert.AreEqual(0, cats[16].FinalScore);
            Assert.AreEqual(60, cats[17].FinalScore);

            scoreSheet.Score("Threes", new DieSet(3, 3, 3, 3, 6));
            cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(72, cats[6].FinalScore);
            Assert.AreEqual(35, cats[7].FinalScore);
            Assert.AreEqual(0, cats[15].FinalScore);
            Assert.AreEqual(0, cats[16].FinalScore);
            Assert.AreEqual(107, cats[17].FinalScore);

            scoreSheet.Score("Yahtzee", new DieSet(1, 1, 1, 1, 1));
            cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(72, cats[6].FinalScore);
            Assert.AreEqual(35, cats[7].FinalScore);
            Assert.AreEqual(50, cats[15].FinalScore);
            Assert.AreEqual(0, cats[16].FinalScore);
            Assert.AreEqual(157, cats[17].FinalScore);

            scoreSheet.Score("Large Straight", new DieSet(6, 6, 6, 6, 6));
            cats = scoreSheet.printScoreSheet();
            Assert.AreEqual(72, cats[6].FinalScore);
            Assert.AreEqual(35, cats[7].FinalScore);
            Assert.AreEqual(90, cats[15].FinalScore);
            Assert.AreEqual(100, cats[16].FinalScore);
            Assert.AreEqual(297, cats[17].FinalScore);
        }
 public void testScoreSheetPrintCategories()
 {
     ScoreSheet scoreSheet = new ScoreSheet();
     scoreSheet.setupGame("Yahtzee");
     List<ScoringCategory> cats = scoreSheet.printScoreSheet();
     Assert.AreEqual("Aces", cats[0].Name);
     Assert.AreEqual("Twos", cats[1].Name);
     Assert.AreEqual("Threes", cats[2].Name);
     Assert.AreEqual("Fours", cats[3].Name);
     Assert.AreEqual("Fives", cats[4].Name);
     Assert.AreEqual("Sixes", cats[5].Name);
     Assert.AreEqual("Upper Total", cats[6].Name);
     Assert.AreEqual("Upper Bonus", cats[7].Name);
     Assert.AreEqual("Three of a Kind", cats[8].Name);
     Assert.AreEqual("Four of a Kind", cats[9].Name);
     Assert.AreEqual("Full House", cats[10].Name);
     Assert.AreEqual("Small Straight", cats[11].Name);
     Assert.AreEqual("Large Straight", cats[12].Name);
     Assert.AreEqual("Yahtzee", cats[13].Name);
     Assert.AreEqual("Chance", cats[14].Name);
     Assert.AreEqual("Lower Total", cats[15].Name);
     Assert.AreEqual("Bonus Yahtzee Total", cats[16].Name);
     Assert.AreEqual("Total", cats[17].Name);
 }