LeastFixedPoint/wave-dice-robot

implement target numbers for "sum of all rolls"

Closed this issue · 7 comments

@Test
public void testVsFail()
{
  final AdditiveRoll method = new AdditiveRoll(mockDieRollerFactory(1,6));
  final MockOutput output = new MockOutput();
  method.writeResult("2d6 vs 9", output);
  Assert.assertEquals("1 + 6 = 7 (failed by 2)", output.getString());
}

@Test
public void testVsPass()
{
  final AdditiveRoll method = new AdditiveRoll(mockDieRollerFactory(6));
  final MockOutput output = new MockOutput();
  method.writeResult("d6 vs 3", output);
  Assert.assertEquals("6 (passed by 3)", output.getString());
}

Original issue reported on code.google.com by trent.ba...@gmail.com on 1 Nov 2009 at 7:36

A good idea, will do it.

Original comment by shooshpa...@gmail.com on 2 Nov 2009 at 9:33

  • Changed state: Accepted

Original comment by shooshpa...@gmail.com on 2 Nov 2009 at 10:01

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Original comment by shooshpa...@gmail.com on 8 Nov 2009 at 12:21

Original comment by shooshpa...@gmail.com on 10 Nov 2009 at 8:09

  • Changed title: implement target numbers for "sum of all rolls"

Original comment by shooshpa...@gmail.com on 10 Nov 2009 at 8:12

  • Added labels: Method-sum

Original comment by shooshpa...@gmail.com on 11 Nov 2009 at 9:07

  • Changed state: Started

Original comment by shooshpa...@gmail.com on 11 Nov 2009 at 10:18

  • Changed state: Fixed