Exemple #1
0
        public void MaybeAsClass()
        {
            var test = new Test();
            var mTest = test.ToMaybeAs<Test>();
            Assert.AreEqual(true, mTest.IsSomething);
            Assert.AreEqual(false, mTest.IsNothing);

            var nothing = test.ToMaybeAs<INobady>();
            Assert.AreEqual(false, nothing.IsSomething);
            Assert.AreEqual(true, nothing.IsNothing);
        }