public void GetCurrentUser() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); }); }
public void UpdatePreferences() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); UserPreferencesModel preferences = await client.Users.GetPreferences(user); Assert.IsNotNull(preferences); preferences.chatLurkMode = !preferences.chatLurkMode; UserPreferencesModel newPreferences = await client.Users.UpdatePreferences(user, preferences); Assert.IsNotNull(preferences); Assert.AreEqual(preferences.chatLurkMode, newPreferences.chatLurkMode); preferences.chatLurkMode = !preferences.chatLurkMode; newPreferences = await client.Users.UpdatePreferences(user, preferences); Assert.IsNotNull(preferences); Assert.AreEqual(preferences.chatLurkMode, newPreferences.chatLurkMode); }); }
public void GetCurrentUser() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); }); }
public void GetTeams() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); IEnumerable <TeamMembershipExpandedModel> teams = await client.Users.GetTeams(user); Assert.IsNotNull(teams); }); }
public void GetPreferences() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); UserPreferencesModel preferences = await client.Users.GetPreferences(user); Assert.IsNotNull(preferences); }); }
public void GetAvatar() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); string avatar = await connection.Users.GetAvatar(user); Assert.IsNotNull(avatar); }); }
public void GetTeams() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); IEnumerable <TeamMembershipExpandedModel> teams = await connection.Users.GetTeams(user); Assert.IsNotNull(teams); }); }
public void GetPreferences() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); UserPreferencesModel preferences = await connection.Users.GetPreferences(user); Assert.IsNotNull(preferences); }); }
public void GetAvatar() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); string avatar = await client.Users.GetAvatar(user); Assert.IsNotNull(avatar); }); }
public void GetUser() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); UserWithChannelModel channelUser = await client.Users.GetUser(user); Assert.IsNotNull(channelUser); Assert.IsTrue(channelUser.id > (uint)0); }); }
public void GetNotifications() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); IEnumerable <NotificationModel> notifications = await connection.Users.GetNotifications(user, 1); Assert.IsNotNull(notifications); Assert.IsTrue(notifications.Count() > 0); }); }
public void GetLogs() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); IEnumerable <UserLogModel> logs = await client.Users.GetLogs(user); Assert.IsNotNull(logs); Assert.IsTrue(logs.Count() > 0); }); }
public void GetFollows() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); IEnumerable <ChannelAdvancedModel> follows = await connection.Users.GetFollows(user, 1); Assert.IsNotNull(follows); Assert.IsTrue(follows.Count() > 0); }); }
public void GetUser() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); UserWithChannelModel channelUser = await connection.Users.GetUser(user); Assert.IsNotNull(channelUser); Assert.IsTrue(channelUser.id > (uint)0); }); }
public void GetSubscriptions() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); IEnumerable <SubscriptionWithGroupModel> subs = await connection.Users.GetSubscriptions(user, 1); Assert.IsNotNull(subs); Assert.IsTrue(subs.Count() > 0); }); }
public void GetFollows() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); IEnumerable <ChannelAdvancedModel> follows = await client.Users.GetFollows(user); Assert.IsNotNull(follows); Assert.IsTrue(follows.Count() > 0); }); }
public void GetNotifications() { this.TestWrapper(async(MixerClient client) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(client); IEnumerable <NotificationModel> notifications = await client.Users.GetNotifications(user); Assert.IsNotNull(notifications); Assert.IsTrue(notifications.Count() > 0); }); }
public void GetLogs() { TestWrapper(async(MixerConnection connection) => { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); IEnumerable <UserLogModel> logs = await connection.Users.GetLogs(user, 1); Assert.IsNotNull(logs); Assert.IsTrue(logs.Count() > 0); }); }
public static async Task <InteractiveGameListingModel> CreateTestGame(MixerConnection connection, ChannelModel channel) { UserModel user = await UsersServiceUnitTests.GetCurrentUser(connection); IEnumerable <InteractiveGameListingModel> gameListings = await connection.Interactive.GetOwnedInteractiveGames(channel); InteractiveGameListingModel previousTestGame = gameListings.FirstOrDefault(g => g.name.Equals(InteractiveServiceUnitTests.InteractiveGameName)); if (previousTestGame != null) { await InteractiveServiceUnitTests.DeleteTestGame(connection, previousTestGame); } InteractiveGameModel game = new InteractiveGameModel() { name = InteractiveServiceUnitTests.InteractiveGameName, ownerId = user.id, }; game = await connection.Interactive.CreateInteractiveGame(game); Assert.IsNotNull(game); Assert.IsTrue(game.id > 0); game.controlVersion = "2.0"; game = await connection.Interactive.UpdateInteractiveGame(game); Assert.IsNotNull(game); Assert.IsTrue(game.id > 0); gameListings = await connection.Interactive.GetOwnedInteractiveGames(channel); Assert.IsNotNull(gameListings); Assert.IsTrue(gameListings.Count() > 0); InteractiveGameListingModel gameListing = gameListings.FirstOrDefault(gl => gl.id.Equals(game.id)); Assert.IsNotNull(gameListing); InteractiveGameVersionModel version = gameListing.versions.First(); InteractiveSceneModel defaultScene = new InteractiveSceneModel() { sceneID = "default", }; defaultScene.buttons.Add(InteractiveClientUnitTests.CreateTestButton()); defaultScene.joysticks.Add(InteractiveClientUnitTests.CreateTestJoystick()); version.controls.scenes.Add(defaultScene); version.controlVersion = "2.0"; version = await connection.Interactive.UpdateInteractiveGameVersion(version); gameListings = await connection.Interactive.GetOwnedInteractiveGames(channel); Assert.IsNotNull(gameListings); Assert.IsTrue(gameListings.Count() > 0); gameListing = gameListings.FirstOrDefault(gl => gl.id.Equals(game.id)); Assert.IsNotNull(gameListing); return(gameListing); }