Esempio n. 1
0
        public void CanClassReturnValueWhenClassIsNullReturn()
        {
            var sc = new SomeClass
            {
                SomeString = null,
                SomeValue = 5
            };

            Assert.AreEqual(sc.ToMaybe().With(x => x.SomeString).Return(x => x, TestKey), TestKey);
        }
Esempio n. 2
0
        public void CanClassReturnValueWith()
        {
            var sc = new SomeClass
                         {
                             SomeString = TestValue,
                             SomeValue = 5
                         };

            Assert.AreEqual(sc.ToMaybe().With(x => x.SomeString).Value, TestValue);
        }
Esempio n. 3
0
        public void CanClassReturnValueReturn()
        {
            var sc = new SomeClass
            {
                SomeString = TestValue,
                SomeValue = 5
            };

            Assert.AreEqual(sc.ToMaybe().Return(x => x.SomeString, "Test"), TestValue);
        }