public void Just_FMap_ReturnsNothing() { var just = new Just <string>("Hello"); var result = just.FMap <int>(a => Int32.Parse(a)); Assert.IsInstanceOf <Nothing <int> >(result); }
public void Just_FMap_ReturnsJust() { var just = new Just<string>("42"); var result = just.FMap<int>(a => Int32.Parse(a)); Assert.IsInstanceOf<Just<int>>(result); var actualResult = result as Just<int>; Assert.AreEqual(42, actualResult.Value); }
public void Just_FMap_ReturnsJust() { var just = new Just <string>("42"); var result = just.FMap <int>(a => Int32.Parse(a)); Assert.IsInstanceOf <Just <int> >(result); var actualResult = result as Just <int>; Assert.AreEqual(42, actualResult.Value); }
public void Just_FMap_ReturnsNothing() { var just = new Just<string>("Hello"); var result = just.FMap<int>(a => Int32.Parse(a)); Assert.IsInstanceOf<Nothing<int>>(result); }