コード例 #1
0
        public void AddTournament_Save()
        {
            TournamentModel tournament = NewTournament();

            tournament.Description = Guid.NewGuid().ToString();
            tournament.InviteCode  = "1234";
            service.AddTournament(tournament);
            var result = unitOfWork.Save();

            Assert.AreEqual(true, result);
        }
コード例 #2
0
 public virtual ActionResult CreateTournament(Tournament tournament)
 {
     tournament.InitializeDefaults();
     TournamentService.AddTournament(tournament);
     return(RedirectToRoute(new { action = MVC.Admin.TournamentAdmin.ActionNames.EditTournament, tournamentId = tournament.Id }));
 }