public void GetProperSidesOfDefaultDie() { Assert.AreEqual(DiceSides.d4, Die.D4().Sides); Assert.AreEqual(DiceSides.d6, Die.D6().Sides); Assert.AreEqual(DiceSides.d8, Die.D8().Sides); Assert.AreEqual(DiceSides.d10, Die.D10().Sides); Assert.AreEqual(DiceSides.d12, Die.D12().Sides); Assert.AreEqual(DiceSides.d20, Die.D20().Sides); Assert.AreEqual(DiceSides.d100, Die.D100().Sides); }
public void AnyTypeOfDieMayBeAddedToTheCup() { var cup = new Cup(); cup.AddDie(Die.D4()); cup.AddDie(Die.D10()); cup.AddDie(Die.D6()); Assert.AreEqual(new Die[] { Die.D4(), Die.D10(), Die.D6() }, cup.Dice); }
public void FormatsCupIntoADiceString() { var cup = new Cup(); cup.AddDie(Die.D10()); Assert.AreEqual("1d10", cup.ToString()); cup.AddDie(Die.D10()); Assert.AreEqual("2d10", cup.ToString()); cup.Modifier = 5; Assert.AreEqual("2d10+5", cup.ToString()); cup.AddDie(Die.D6()); Assert.AreEqual("2d10+1d6+5", cup.ToString()); }
public void D10ReturnsAllSideValues() { ValidateAllSides(Die.D10()); Assert.Pass(); }