Esempio n. 1
0
        public void SetLookupIdsFromListTest()
        {
            var expected = new List <int> {
                1, 2, 3, 5, 7, 11, 13
            };

            var item    = CreateFakeItem();
            var wrapper = new ListItemWrapper(item);

            wrapper.SetLookupIds("MyLookup", expected);
            var actualFields = (FieldLookupValue[])item["MyLookup"];
            var actual       = actualFields.Select(f => f.LookupId).ToList();

            Assert.IsTrue(expected.All(v => actual.Contains(v)));
            Assert.IsTrue(actual.All(v => expected.Contains(v)));
        }