public decimal TesNonSpecialCardPayout(string reelStripsString) { //arrange var lineBet = 1.0m; var reelStrips = ParsheetTests.Encoding(reelStripsString.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray()); // action var result = Payout.GetNonSpecialCardPayout(reelStrips, lineBet, new int[] { 15, 16, 17 }); //assert return(result.Payable); }
public decimal TesRedEnvelopeJackpotPayout(string reelStripsString) { //arrange var lineBet = 1.0m; var reelStrips = ParsheetTests.Encoding(reelStripsString.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray()); // action var result = Payout.GetRedEnvelopeJackpotPayout(reelStrips, lineBet); //assert return(result.Payable); }
public decimal TestSpin(string reelStripsString, int replaceBy) { // arrange var request = CreateRequestContext <SpinArgs>(user); request.Parameters = new SpinArgs { LineBet = 1.0m, Multiplier = 1 };; var reelStrips = ParsheetTests.Encoding(reelStripsString.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray()); var wheel = CreateWheel(reelStrips, replaceBy); wheel.Replace = replaceBy; // action var result = Engine.DoSpin(1, request, wheel); // assert return(result.Win); }
public decimal TestFreeSpinAndHasAdditionalFreeSpin(string freeSpinStripsString, int replaceBy) { // arrange var request = CreateRequestContext <SpinArgs>(user); request.Parameters = new SpinArgs { LineBet = 1.0m, Multiplier = 1 }; var bonusRequest = CreateRequestContext <BonusArgs>(user); var reelStrips = ParsheetTests.Encoding("0,18,18,3,4,15,5,8,14,7,8,14,4,2,14".Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray()); var wheel = CreateWheel(reelStrips, replaceBy); wheel.Replace = replaceBy; // action var result = Engine.DoSpin(1, request, wheel); var bonus = module.CreateBonus(result); var freeSpinBonus = bonus.Value as FreeSpinBonus; reelStrips = ParsheetTests.Encoding(freeSpinStripsString.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray()); wheel = CreateWheel(reelStrips, replaceBy); wheel.Replace = replaceBy; var freeSpinResult = Engine.ClaimBonus(1, freeSpinBonus, bonusRequest, wheel) as FuDaoLeFreeSpinResult; var result1 = freeSpinResult.SpinResult; // assert Assert.AreEqual(freeSpinResult.Counter, 7 + result1.Bonus.Count); Assert.AreEqual(freeSpinResult.CumulativeWin, freeSpinResult.Win); Assert.AreEqual(freeSpinResult.IsCompleted, false); Assert.AreEqual(freeSpinBonus.CurrentStep, 2); Assert.AreEqual(freeSpinBonus.Counter, 7 + result1.Bonus.Count); Assert.AreEqual(freeSpinBonus.IsCompleted, false); Assert.AreEqual(string.Join(',', result.BonusPositions[0].RowPositions), "0,0,3,3,3"); return(freeSpinResult.Win); }
public decimal TestSpinAndTriggerFreeSpinBonus(string reelStripsString, int replaceBy) { // arrange var request = CreateRequestContext <SpinArgs>(user); request.Parameters = new SpinArgs { LineBet = 1.0m, Multiplier = 1 }; var reelStrips = ParsheetTests.Encoding(reelStripsString.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray()); var wheel = CreateWheel(reelStrips, replaceBy); wheel.Replace = replaceBy; // action var result = Engine.DoSpin(1, request, wheel); // assert Assert.AreEqual(result.Bonus.Count, 8); Assert.AreEqual(string.Join(',', result.BonusPositions[0].RowPositions), "0,0,3,3,3"); return(result.Win); }