示例#1
0
        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);
        }
示例#2
0
文件: MaybeSpec.cs 项目: rarous/Maybe
 public void NothingShouldBindToNothing()
 {
     var nothing = new Nothing<int>();
     Assert.IsType<Nothing<int>>(nothing.Bind(x => (x + 1).ToMaybe()));
 }
示例#3
0
 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);
 }