public ActionResult MakeBidOnPlayer(int id, int teamId, decimal bid) { var bidding = new PlayerBidding(_playerRepository, _teamRepository, _biddingRespoitory); var biddingStatus = bidding.BiddingStatus(teamId, bid, id); var redirectUrl = new UrlHelper(Request.RequestContext).Action("NextStageOfBidding", new { id, teamId, bid }); return(Json(new { Url = redirectUrl, BiddingStatus = biddingStatus })); //return RedirectToAction("NextStageOfBidding", new {id, teamId, bid}); }
public void SetUp() { _playerRepository = new Mock <IPlayerRepository>(); _teamRepository = new Mock <ITeamRepository>(); var team = new Team { id = 1, TotalBudget = 3500000 }; var player = new Player { id = 2, NegotiationPrice = 200000, BuyoutPrice = 300000 }; _playerRepository.Setup(pr => pr.GetPlayer(2)).Returns(player); _teamRepository.Setup(tr => tr.GetTeam(1)).Returns(team); _bidding = new PlayerBidding(_playerRepository.Object, _teamRepository.Object); }