Beispiel #1
0
        private int GetGroupId()
        {
            IGroupListApi api      = new GroupListApi(context);
            var           response = api.Execute();

            return(response.Groups[3].Id);
        }
Beispiel #2
0
        public void TestGetGroupListApi()
        {
            IGroupListApi api      = new GroupListApi(context);
            var           response = api.Execute();

            Assert.IsTrue(response.Groups.Count > 3);
            Assert.AreEqual("未分组", response.Groups[0].Name);
            Assert.AreEqual("黑名单", response.Groups[1].Name);
            Assert.AreEqual("星标组", response.Groups[2].Name);
        }
Beispiel #3
0
        private void ClearTestGroupsWithName(string name)
        {
            IGroupListApi api      = new GroupListApi(context);
            var           response = api.Execute();

            foreach (var group in response.Groups)
            {
                if (group.Name == name)
                {
                    DeleteGroup(group.Id);
                }
            }
        }
Beispiel #4
0
        private bool GroupExists(int id)
        {
            IGroupListApi api      = new GroupListApi(context);
            var           response = api.Execute();

            foreach (var group in response.Groups)
            {
                if (group.Id == id)
                {
                    return(true);
                }
            }
            return(false);
        }
Beispiel #5
0
        private bool GroupExists(string name)
        {
            IGroupListApi api      = new GroupListApi(context);
            var           response = api.Execute();

            foreach (var group in response.Groups)
            {
                if (group.Name == name)
                {
                    return(true);
                }
            }
            return(false);
        }