Пример #1
0
        public void GetIdFromFieldLookupValueDummy()
        {
            var expected = 42;

            var dummy = new FieldLookupValueDummy(expected, null);

            Assert.AreEqual(expected, dummy.LookupId);
        }
Пример #2
0
        public void GetValueFromFieldLookupValueDummy()
        {
            var expected = "Test Value";

            var dummy = new FieldLookupValueDummy(1, expected);

            Assert.AreEqual(expected, dummy.LookupValue);
        }
Пример #3
0
        public void GetLookupValueFromValueTest()
        {
            var expected = "Test Value";
            var item     = CreateFakeItem();

            item["MyLookup"] = new FieldLookupValueDummy(42, expected);

            var mapper = new ListItemWrapper(item);
            var actual = mapper.GetLookupValue("MyLookup");

            Assert.AreEqual(expected, actual);
        }