public void CanPlay()
        {
            var competiontion = new Competition(Guid.Empty);
            var p1            = new Guid("d912dfb3-f30b-4e93-acc1-ce66a0e17884");
            var p2            = new Guid("c7b5f0dd-8b0a-4d48-ae6f-75387d7fa8ec");
            var p3            = new Guid("50ab6599-c98b-4157-9aa0-7c7e9c6a63b7");
            var p4            = new Guid("c16bdaef-dccd-416d-bee8-91b2768186cc");

            competiontion.AddPlayer(p1);
            competiontion.AddPlayer(p2);
            competiontion.AddPlayer(p3);
            competiontion.AddPlayer(p4);
            competiontion.PlayGame(p1, p2, p3, p4, 10, 8);
        }
        public void Create_Tour_With_Competitions_And_Players()
        {
            var courseconfig = new Courseconfiguration
            {
                CourseMap   = "coursemap",
                CourseName  = "first",
                Description = "my first course"
            };

            courseconfig.AddHole(new Hole {
                Length = 100, Number = 1, Par = 3
            });
            courseconfig.AddHole(new Hole {
                Length = 86, Number = 2, Par = 3
            });
            courseconfig.AddHole(new Hole {
                Length = 149, Number = 3, Par = 4
            });

            var player1 = new Player
            {
                Email     = "*****@*****.**",
                FirstName = "firstname",
                LastName  = "lastname",
                Phone     = "08112233"
            };

            var player2 = new Player
            {
                Email     = "*****@*****.**",
                FirstName = "john",
                LastName  = "doe",
                Phone     = "08334422"
            };

            var competition = new Competition {
                Date = DateTime.UtcNow, Name = "dgt1"
            };

            competition.AddPlayer(new PlayerStatus {
                Player = player1, Status = PlayerCompetitionStatus.Registered
            });
            competition.AddPlayer(new PlayerStatus {
                Player = player2, Status = PlayerCompetitionStatus.Payed
            });

            competition.AddRound(new Round {
                Courseconfig = courseconfig, RoundNumber = 1
            });
            competition.AddRound(new Round {
                Courseconfig = courseconfig, RoundNumber = 2
            });

            var tour = new Tour {
                Year = "2015", Description = "testTour"
            };

            tour.AddCompetition(competition);

            Player dbPlayer1;
            Player dbPlayer2;
            Courseconfiguration dbCourseconfig;
            Tour dbTour;

            using (var session = NHibernateFactory.OpenSession())
            {
                using (var transaction = session.BeginTransaction())
                {
                    var pid1 = session.Save(player1);
                    var pid2 = session.Save(player2);
                    var cid  = session.Save(courseconfig);
                    var tid  = session.Save(tour);

                    dbPlayer1      = session.Get <Player>(pid1);
                    dbPlayer2      = session.Get <Player>(pid2);
                    dbCourseconfig = session.Get <Courseconfiguration>(cid);
                    dbTour         = session.Get <Tour>(tid);

                    session.Delete(dbPlayer1);
                    session.Delete(dbPlayer2);
                    session.Delete(dbCourseconfig);
                    session.Delete(dbTour);

                    transaction.Commit();
                }
            }

            Assert.AreEqual(player1, dbPlayer1);
            Assert.AreEqual(player2, dbPlayer2);
            Assert.AreEqual(courseconfig, dbCourseconfig);
            Assert.AreEqual(tour, dbTour);
        }