/// <summary> /// Registers the team. /// </summary> /// <param name="teamName">Name of the team.</param> /// <returns></returns> public Team RegisterTeam(string teamName) { var adapter = new TeamAdapter(); var team = adapter.RegisterNewTeam(teamName); adapter.SaveChanges(); return(team); }
public static void Create() { var adapter = new TeamAdapter(); Team1Id = adapter.RegisterNewTeam("OM: Team Name 1").Id; Team2Id = adapter.RegisterNewTeam("OM: Team Name 2").Id; Team3Id = adapter.RegisterNewTeam("OM: Team Name 3").Id; adapter.SaveChanges(); }
public void RegsiterNewTeamTest() { var adapter = new TeamAdapter(); var newTeamLoaded = adapter.RegisterNewTeam("Test Team Name"); adapter.SaveChanges(); var loadedItem = adapter.GetTeamById(newTeamLoaded.Id); Assert.AreEqual(newTeamLoaded.Id, loadedItem.Id); }