public void TestOnesSomeOnes() { DieSet dieSet = new DieSet(1, 1, 2, 3, 1); ScoringCategory ones = new UpperCategory("Ones", 1); int score = ones.CalculateScoreForRoll(dieSet.getCount()); Assert.IsTrue(score == 3); }
public void TestTwosNoTwo() { DieSet dieSet = new DieSet(1, 3, 4, 5, 6); ScoringCategory twos = new UpperCategory("Twos", 2); int score = twos.CalculateScoreForRoll(dieSet.getCount()); Assert.IsTrue(score == 0); }
public void TestFivesSomeFives() { DieSet dieSet = new DieSet(1, 2, 3, 4, 5); ScoringCategory fives = new UpperCategory("Fives", 5); int score = fives.CalculateScoreForRoll(dieSet.getCount()); Assert.IsTrue(score == 5); }
public void TestFoursSomeFours() { DieSet dieSet = new DieSet(4, 1, 2, 3, 4); ScoringCategory fours = new UpperCategory("Fours", 4); int score = fours.CalculateScoreForRoll(dieSet.getCount()); Assert.IsTrue(score == 8); }
public void TestFives_MultiUseCategory_ThrowsException() { DieSet dieSet = new DieSet(1, 1, 2, 3, 1); ScoringCategory fives = new UpperCategory("Fives", 5); int score = fives.Score(dieSet.getCount()); score = fives.Score(dieSet.getCount()); }
public void TestSixesSomeSixes() { DieSet dieSet = new DieSet(1, 2, 5, 6, 6); ScoringCategory sixes = new UpperCategory("Sixes", 6); int score = sixes.CalculateScoreForRoll(dieSet.getCount()); Assert.IsTrue(score == 12); }
public void TestTwos_MultiUseCategory_ThrowsException() { DieSet dieSet = new DieSet(1, 1, 2, 3, 1); ScoringCategory twos = new UpperCategory("Twos", 2); int score = twos.Score(dieSet.getCount()); score = twos.Score(dieSet.getCount()); }
public void TestTwosSomeTwos() { DieSet dieSet = new DieSet(1, 1, 2, 2, 3); ScoringCategory twos = new UpperCategory("Twos", 2); int score = twos.CalculateScoreForRoll(dieSet.getCount()); Assert.IsTrue(score == 4); }
public void TestScoreTwos() { DieSet die = new DieSet(1, 1, 2, 3, 4); ScoringCategory twos = new UpperCategory("Twos", 2); Assert.IsTrue(twos.Name == "Twos"); Assert.IsTrue(twos.HasBeenUsed == false); Assert.IsTrue(twos.Upper); Assert.IsFalse(twos.Lower); twos.Score(die.getCount()); Assert.IsTrue(twos.HasBeenUsed == true); Assert.IsTrue(twos.FinalScore == 2); }
public void TestScoreFours() { DieSet die = new DieSet(4, 4, 4, 3, 4); ScoringCategory fours = new UpperCategory("Fours", 4); Assert.IsTrue(fours.Name == "Fours"); Assert.IsTrue(fours.HasBeenUsed == false); Assert.IsTrue(fours.Upper); Assert.IsFalse(fours.Lower); fours.Score(die.getCount()); Assert.IsTrue(fours.HasBeenUsed == true); Assert.IsTrue(fours.FinalScore == 16); }
public void TestScoreFives() { DieSet die = new DieSet(1, 2, 5, 5, 5); ScoringCategory fives = new UpperCategory("Fives", 5); Assert.IsTrue(fives.Name == "Fives"); Assert.IsTrue(fives.HasBeenUsed == false); Assert.IsTrue(fives.Upper); Assert.IsFalse(fives.Lower); fives.Score(die.getCount()); Assert.IsTrue(fives.HasBeenUsed == true); Assert.IsTrue(fives.FinalScore == 15); }
public void TestScoreSixes() { DieSet die = new DieSet(1, 6, 5, 6, 6); ScoringCategory sixes = new UpperCategory("Sixes", 6); Assert.IsTrue(sixes.Name == "Sixes"); Assert.IsTrue(sixes.HasBeenUsed == false); Assert.IsTrue(sixes.Upper); Assert.IsFalse(sixes.Lower); sixes.Score(die.getCount()); Assert.IsTrue(sixes.HasBeenUsed == true); Assert.IsTrue(sixes.FinalScore == 18); }
public void TestScoreOnes() { DieSet die = new DieSet(1, 1, 2, 3, 4); ScoringCategory ones = new UpperCategory("Ones", 1); Assert.IsTrue(ones.Name == "Ones"); Assert.IsTrue(ones.HasBeenUsed == false); Assert.IsTrue(ones.Upper); Assert.IsFalse(ones.Lower); ones.Score(die.getCount()); Assert.IsTrue(ones.HasBeenUsed == true); Assert.IsTrue(ones.FinalScore == 2); }
public void TestFoursRules() { ScoringCategory fours = new UpperCategory("Fours", 4); Assert.AreEqual("Fours: Scores the sum of all dice showing 4.", fours.getRules()); }
public void TestTwosRules() { ScoringCategory twos = new UpperCategory("Twos", 2); Assert.AreEqual("Twos: Scores the sum of all dice showing 2.", twos.getRules()); }
public void TestFivesRules() { ScoringCategory fives = new UpperCategory("Fives", 5); Assert.AreEqual("Fives: Scores the sum of all dice showing 5.", fives.getRules()); }
public void TestUpperConstructor() { ScoringCategory ones = new UpperCategory(); Assert.IsInstanceOf(typeof(UpperCategory), ones); }
public void TestSixesRules() { ScoringCategory sixes = new UpperCategory("Sixes", 6); Assert.AreEqual("Sixes: Scores the sum of all dice showing 6.", sixes.getRules()); }
public void TestOnesRules() { ScoringCategory ones = new UpperCategory("Ones", 1); Assert.AreEqual("Ones: Scores the sum of all dice showing 1.", ones.getRules()); }