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); }
public virtual ActionResult CreateTournament(Tournament tournament) { tournament.InitializeDefaults(); TournamentService.AddTournament(tournament); return(RedirectToRoute(new { action = MVC.Admin.TournamentAdmin.ActionNames.EditTournament, tournamentId = tournament.Id })); }