Beispiel #1
0
        public async Task Info()
        {
            var testUser = User.GetUser(out var tokenSuccess);

            Assert.IsNotNull(testUser);
            Assert.IsTrue(tokenSuccess);

            var info = await UserSync.Info();

            Assert.AreEqual(info.EMail, testUser.Email);
            Assert.AreEqual(info.Id, testUser.Id);
            Assert.AreEqual(info.Username, testUser.Username);
        }
Beispiel #2
0
        public async Task <(User user, int listId)> GetUserWithList(bool withToken = true)
        {
            User user;

            if (withToken)
            {
                user = User.GetUser(out var success);
                IsTrue(success, "Token is missing");
            }
            else
            {
                user = User.GetUser();
            }

            var info = await UserSync.Info();

            IsNotNull(info.ListIds, "The User has no lists");

            var list = info.ListIds.FirstOrDefault();

            IsNotNull(list, "The User has no lists");

            return(user, list);
        }