コード例 #1
0
        public async Task RemoveItemsFromMultiValuedFieldAsyncTest()
        {
            var obj = new APObject("object");

            obj.SetList("multifield", new int[] { 1, 2, 3 });
            await obj.SaveAsync();

            await obj.RemoveItemsAsync("multifield", "1", "2");

            var list = obj.GetList <string>("multifield");

            Assert.IsTrue(list.Count() == 1);
            Assert.IsTrue(list.Except(new[] { "3" }).Count() == 0);
        }
コード例 #2
0
 public async Task RemoveItemsFromMultiValuedFieldAsyncTest()
 {
     var obj = new APObject("object");
     obj.SetList("multifield", new int[] { 1, 2, 3 });
     await obj.SaveAsync();
     await obj.RemoveItemsAsync("multifield", "1", "2");
     var list = obj.GetList<string>("multifield");
     Assert.IsTrue(list.Count() == 1);
     Assert.IsTrue(list.Except(new[] { "3" }).Count() == 0);
 }