public void CalculateScore_Roll334455_returnsIntScore1500() { Mock <model.IHand> fake_hand_334455 = new Mock <model.IHand>(); fake_hand_334455 = fake_hand_334455_setup(fake_hand_334455); model.IPlayer sutScore = new model.Player(fake_hand_334455.Object); int actual = sutScore.CalculateScore(); int expected = 1500; Assert.Equal(expected, actual); }
public void CalculateScore_Roll123456_returnsIntScore3000() { Mock <model.IHand> fake_hand_123456 = new Mock <model.IHand>(); fake_hand_123456 = fake_hand_123456_setup(fake_hand_123456); model.IPlayer sutScore = new model.Player(fake_hand_123456.Object); int actual = sutScore.CalculateScore(); int expected = 3000; Assert.Equal(expected, actual); }
public void CalculateScore_Roll333333_returnsIntScore3000() { Mock <model.IHand> fake_hand_333333 = new Mock <model.IHand>(); fake_hand_333333 = fake_hand_333333_setup(fake_hand_333333); model.IPlayer sutScore = new model.Player(fake_hand_333333.Object); int actual = sutScore.CalculateScore(); int expected = (3000); // Rolled Dices (3 3 3 3 3 3), Six 3's: 3000 points. Assert.Equal(expected, actual); }
public void CalculateScore_Save555ThenRoll246_returnsIntScore0() { Mock <model.IHand> fake_hand_555246 = new Mock <model.IHand>(); fake_hand_555246 = fake_hand_555246_setup(fake_hand_555246); model.IPlayer sutScore = new model.Player(fake_hand_555246.Object); int actual = sutScore.CalculateScore(); int expected = 0; // Saved Dices (5 5 5) = Three 5's: 500 points. Rolled Dices (2 4 6) trigger Farkle. Assert.Equal(expected, actual); }
public void CalculateScore_Save555ThenRoll114_returnsIntScore700() { Mock <model.IHand> fake_hand_114555 = new Mock <model.IHand>(); fake_hand_114555 = fake_hand_114555_setup(fake_hand_114555); model.IPlayer sutScore = new model.Player(fake_hand_114555.Object); int actual = sutScore.CalculateScore(); int expected = (700); // Saved Dices (5 5 5) = Three 5's: 500 points. Rolled Dices (1 1 4), Two 1's: 100 * 2 = 200 points. Assert.Equal(expected, actual); }
public void CalculateScore_Roll222444_returnsIntScore600() { Mock <model.IHand> fake_hand_222444 = new Mock <model.IHand>(); fake_hand_222444 = fake_hand_222444_setup(fake_hand_222444); model.IPlayer sutScore = new model.Player(fake_hand_222444.Object); int actual = sutScore.CalculateScore(); int expected = 600; Assert.Equal(expected, actual); }