Example #1
0
        public void BotUnBlockUser()
        {
            LoginFile file = GetLoginInformation();

            Task.Run(async() =>
            {
                using (BotUser user = new BotUser(file.Username))
                {
                    ELoginResponse response = await user.Login(file.Password);

                    Assert.IsTrue(response == ELoginResponse.Success);

                    Assert.IsTrue(await user.Unblock((User)341044272));
                }
            }).Wait();
        }
Example #2
0
        public void BotGetRobux()
        {
            Task.Run(async() =>
            {
                LoginFile file = GetLoginInformation();

                using (BotUser user = new BotUser(file.Username))
                {
                    ELoginResponse response = await user.Login(file.Password);

                    Assert.IsTrue(response == ELoginResponse.Success);

                    Assert.IsTrue(await user.UpdateRobux());

                    Assert.IsTrue(user.Robux >= 0);

                    Console.WriteLine("Robux for user {0}: {1}", user.CurrentUser, user.Robux);
                }
            }).Wait();
        }
Example #3
0
        public void BotGetIncomingItems()
        {
            Task.Run(async() =>
            {
                LoginFile file = GetLoginInformation();

                using (BotUser user = new BotUser(file.Username))
                {
                    ELoginResponse response = await user.Login(file.Password);

                    Assert.IsTrue(response == ELoginResponse.Success);

                    UserIncomingItems incomingItems = await user.GetIncomingItems();

                    Assert.IsNotNull(incomingItems);

                    Console.WriteLine("Incoming Friend Requests: {0} Unread Message Count: {1}", incomingItems.FriendRequestsCount, incomingItems.UnreadMessageCount);
                }
            }).Wait();
        }
Example #4
0
        public void BotGetFollowers()
        {
            LoginFile file = GetLoginInformation();

            Task.Run(async() =>
            {
                using (BotUser user = new BotUser(file.Username))
                {
                    ELoginResponse response = await user.Login(file.Password);

                    Assert.IsTrue(response == ELoginResponse.Success);

                    User[] users = await user.GetFollowers();

                    Assert.IsNotNull(users);
                    Assert.IsTrue(users.Length > 0);

                    Console.WriteLine("Follower Count: {0}", users.Length);
                }
            }).Wait();
        }
Example #5
0
        public void BotIsFollowing()
        {
            LoginFile file = GetLoginInformation();

            Task.Run(async() =>
            {
                using (BotUser user = new BotUser(file.Username))
                {
                    ELoginResponse response = await user.Login(file.Password);

                    Assert.IsTrue(response == ELoginResponse.Success);

                    User followingUser = await User.FromID(5762824);

                    Assert.IsNotNull(followingUser);

                    bool isFollowing = await user.IsFollowing(followingUser);

                    Assert.IsTrue(isFollowing);
                }
            }).Wait();
        }