示例#1
0
            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();
            }
示例#2
0
        /// <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);
        }
示例#3
0
        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);
        }