Esempio n. 1
0
        private void CanModifyMarketProbability()
        {
            var newMarket =
                Common.CreateAndSaveMockMarket(Guid.NewGuid().ToString(), "Market1", 0.9m, MarketController);

            MarketController.UpdateMarketProbability(newMarket.Id, 0.75m);

            var persistedMarket = MarketController.Get(newMarket.Id);

            Assert.Equal(0.75m, persistedMarket.MarketProbability);
        }
Esempio n. 2
0
        private void CanInitialiseAndGetMarketWithBets()
        {
            var nEvent = Common.CreateAndSaveMockEvent(EventController);

            var nMarket = Common.CreateAndSaveMockMarket(
                nEvent.Id, "Market 1", 0.1m, MarketController);

            Common.CreateAndSaveMockBet(nMarket.Id, 1, BetController);
            Common.CreateAndSaveMockBet(nMarket.Id, 2, BetController);
            Common.CreateAndSaveMockBet(nMarket.Id, 3, BetController);

            var persistedMarket = MarketController.Get(nMarket.Id);

            Assert.Equal(3, persistedMarket.MarketBets.Count);
        }