Пример #1
0
        public void GetNullableLongFromNullTest()
        {
            var item = CreateFakeItem();

            item["MyNumber"] = null;

            var mapper = new ListItemWrapper(item);
            var actual = mapper.GetNullableLong("MyNumber");

            Assert.IsNull(actual);
        }
Пример #2
0
        public void GetNullableLongFromStringTest()
        {
            long expected = 42;
            var  item     = CreateFakeItem();

            item["MyNumber"] = expected.ToString();

            var mapper = new ListItemWrapper(item);
            var actual = mapper.GetNullableLong("MyNumber");

            Assert.AreEqual(expected, actual);
        }