public void CupCanHaveABaseValueForTheRoll() { var cup = new Cup(); cup.AddDie(Die.D4()); cup.Modifier = 20; Assert.True(cup.Roll() >= 20); }
public void AnyTypeOfDieMayBeAddedToTheCup() { var cup = new Cup(); cup.AddDie(Die.D4()); cup.AddDie(Die.D10()); cup.AddDie(Die.D6()); Assert.Equal(new Die[] { Die.D4(), Die.D10(), Die.D6() }, cup.Dice); }
public void GetProperSidesOfDefaultDie() { Assert.Equal(DiceSides.d4, Die.D4().Sides); Assert.Equal(DiceSides.d6, Die.D6().Sides); Assert.Equal(DiceSides.d8, Die.D8().Sides); Assert.Equal(DiceSides.d10, Die.D10().Sides); Assert.Equal(DiceSides.d12, Die.D12().Sides); Assert.Equal(DiceSides.d20, Die.D20().Sides); Assert.Equal(DiceSides.d100, Die.D100().Sides); }
public void ReturnsACountOfAllDiceInTheCup() { var cup = new Cup(); cup.AddDie(Die.D10()); Assert.Equal(1, cup.Count); cup.AddDie(Die.D4()); Assert.Equal(2, cup.Count); cup.AddDie(Die.D6()); Assert.Equal(3, cup.Count); }
public void ToStringReturnsADieRepresentation() { var d4 = Die.D4(); Assert.Equal("1d4", d4.ToString()); }
public void D4ReturnsAllSideValues() { ValidateAllSides(Die.D4()); Assert.True(true); }