Пример #1
0
        public void TestMaybeFuncWithNullValueNoDefault()
        {
            const string C_INPUT    = null;
            const string C_EXPECTED = C_INPUT;

            Assert.AreEqual(C_EXPECTED, C_INPUT.Maybe(_ => _.Replace("World", "John")));
        }
Пример #2
0
        public void TestMaybeFuncWithNullValueWithDefault()
        {
            const string C_INPUT    = null;
            const string C_DEFAULT  = "Wayne's World";
            const string C_EXPECTED = C_DEFAULT;

            Assert.AreEqual(C_EXPECTED, C_INPUT.Maybe(_ => _.Replace("World", "John"), C_DEFAULT));
        }