Ejemplo n.º 1
0
        public async Task Can_get_lobby_data()
        {
            var brandId = new Guid("00000000-0000-0000-0000-000000000138");
            var brand   = _gameRepository.Brands.Include(x => x.BrandLobbies).Single(x => x.Id == brandId);
            var lobbyId = brand.BrandLobbies.First().LobbyId;

            var player   = PlayerTestHelper.CreatePlayer(true, brand.Id);
            var playerId = player.Id;

            WaitForPlayerRegistered(playerId);

            var data = await _productOperations.GetProductsForPlayerAsync(
                lobbyId,
                playerId,
                "http://example.org/",
                TestDataGenerator.GetRandomIpAddress(),
                string.Empty);

            Assert.AreEqual(playerId, data.player.id);
            Assert.AreEqual(lobbyId, data.products.lobbyid);
            Assert.AreNotEqual(0, data.products.groups.Count());
            //Assert.AreNotEqual(0, data.products.providers.Count());
        }