public void CreateGetUpdateDeleteGame() { TestWrapper(async(MixerConnection connection) => { ChannelModel channel = await ChannelsServiceUnitTests.GetChannel(connection); InteractiveGameListingModel gameListing = await InteractiveServiceUnitTests.CreateTestGame(connection, channel); IEnumerable <InteractiveGameListingModel> games = await connection.Interactive.GetOwnedInteractiveGames(channel); Assert.IsNotNull(games); Assert.IsTrue(games.Count() > 0); Assert.IsTrue(games.Any(g => g.id.Equals(gameListing.id))); string gameName = gameListing.name = "Test Game"; InteractiveGameModel game = await connection.Interactive.UpdateInteractiveGame(gameListing); Assert.IsNotNull(game); Assert.IsTrue(game.id > 0); Assert.AreEqual(game.name, gameName); await InteractiveServiceUnitTests.DeleteTestGame(connection, game); games = await connection.Interactive.GetOwnedInteractiveGames(channel); Assert.IsNotNull(games); Assert.IsFalse(games.Any(g => g.id.Equals(game.id))); }); }
public static void ClassInitialize(TestContext context) { TestWrapper(async(MixerConnection connection) => { ChannelModel channel = await ChannelsServiceUnitTests.GetChannel(connection); testGameListing = await InteractiveServiceUnitTests.CreateTestGame(connection, channel); }); }
public static void ClassInitialize(TestContext context) { TestWrapper(async(MixerConnection connection) => { ChannelModel channel = await ChannelsServiceUnitTests.GetChannel(connection); testGameListing = await InteractiveServiceUnitTests.CreateTestGame(connection, channel); interactiveClient = await InteractiveClient.CreateFromChannel(connection, channel, testGameListing); Assert.IsTrue(await interactiveClient.Connect()); Assert.IsTrue(await interactiveClient.Ready()); }); }