public void TestMaybeFuncWithNullValueNoDefault() { const string C_INPUT = null; const string C_EXPECTED = C_INPUT; Assert.AreEqual(C_EXPECTED, C_INPUT.Maybe(_ => _.Replace("World", "John"))); }
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)); }