This junit test fails, because wrong bet on wrong runner is cancelled.
@Test def testCancelUnmatchedLayBetIsCancelledTheSameBetOnOtherRunnerExists{
val market = new Market(1,"Match Odds","Man Utd vs Arsenal",1,new Date(2000),List(new Market.Runner(11,"Man Utd"),new Market.Runner(12,"Arsenal")))
market.placeBet(100,123,10,1.95,LAY,11)
market.placeBet(101,123,10,1.95,LAY,12)
assertEquals(2,market.getBets(123).size)
assertEquals(10,market.cancelBets(123,10,1.95,LAY,11),0)
assertEquals(1,market.getBets(123).size)
assertEquals(0,market.getBets(123).filter(b => b.runnerId==11).size)
assertEquals
Original issue reported on code.google.com by daniel.k...@gmail.com on 26 Jul 2010 at 12:08
Original issue reported on code.google.com by
daniel.k...@gmail.com
on 26 Jul 2010 at 12:08