public void GamesAreCreated()
            {
                // Arrange
                var mockUnitOfWork = TestUtils.GetUnitOfWorkMock();
                mockUnitOfWork.SetupGet(x => x.Games).Returns(new MockGamesRepository());
                mockUnitOfWork.SetupGet(x => x.Ladders).Returns(new MockLadderRepository());
                var unitOfWork = mockUnitOfWork.Object;

                var gameServiceMock = new Mock<IGameService>();
                gameServiceMock.Setup(x => x.Create(
                    Enums.GameType.Ranking,
                    It.IsAny<User>(),
                    It.IsAny<string>(),
                    It.IsAny<string>(),
                    It.IsAny<Domain.Games.GameOptions>()))
                    .Returns(TestUtils.CreateGame(2, 1, Enums.GameType.Ranking));

                var ladderService = new LadderService(unitOfWork, gameServiceMock.Object, TestUtils.MockMapTemplateProvider(), new Mock<IEventAggregator>().Object);

                var mapTemplate = TestUtils.GetMapTemplate();

                var ladder = new Ladder("Default", 2, 1);

                ladder.MapTemplates.Add(mapTemplate.Name);

                ladder.Options.MapDistribution = Enums.MapDistribution.Default;
                ladder.Options.VisibilityModifier.Add(Enums.VisibilityModifierType.None);

                ladder.ToggleActive(true);

                unitOfWork.Ladders.Add(ladder);

                var user1 = TestUtils.CreateUser("1");
                var user2 = TestUtils.CreateUser("2");
                ladder.QueueUser(user1);
                ladder.QueueUser(user2);

                // Act
                ladderService.CheckAndCreateMatches();

                // Assert
                Assert.IsTrue(ladder.Games.Any());
                var game = ladder.Games.First();
                Assert.AreEqual(Enums.GameState.Active, game.State);
                Assert.AreEqual(Enums.GameType.Ranking, game.Type);
                Assert.AreEqual(ladder, game.Ladder);
                Assert.IsFalse(ladder.Queue.Any());
            }
            public void UserCannotQueueTwice()
            {
                // Arrange
                var user1 = TestUtils.CreateUser("1");
                var ladder = new Ladder("Default", 2, 1);

                // Act
                ladder.QueueUser(user1);
                ladder.QueueUser(user1);
            }
            public void QueueForUserSuccess()
            {
                // Arrange
                var user1 = TestUtils.CreateUser("1");
                var ladder = new Ladder("Default", 2, 1);

                // Act
                ladder.QueueUser(user1);

                // Assert
                Assert.IsTrue(ladder.Queue.Any());
            }