Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public void NothingShouldBindToNothing()
 {
     var nothing = new Nothing<int>();
     Assert.IsType<Nothing<int>>(nothing.Bind(x => (x + 1).ToMaybe()));
 }
Exemplo n.º 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);
 }