public void Nothing_Bind_ReturnsNothing() { var nothing = new Nothing <string>(); var result = nothing.Bind <string>(a => new Just <string>(a)); Assert.IsInstanceOf <Nothing <string> >(result); }
public void NothingShouldBindToNothing() { var nothing = new Nothing<int>(); Assert.IsType<Nothing<int>>(nothing.Bind(x => (x + 1).ToMaybe())); }
public void Nothing_Bind_ReturnsNothing() { var nothing = new Nothing<string>(); var result = nothing.Bind<string>(a => new Just<string>(a)); Assert.IsInstanceOf<Nothing<string>>(result); }