Пример #1
0
        public static void ToString3()
        {
            var value  = new Obj("Value");
            var either = Either <Obj, Obj> .OfRight(value);

            Assert.Contains("Right", either.ToString(), StringComparison.OrdinalIgnoreCase);
            Assert.Contains(value.ToString(), either.ToString(), StringComparison.OrdinalIgnoreCase);
        }
Пример #2
0
        public static void ToString1()
        {
            var ok = Fallible.Ok;

            Assert.Equal("Success", ok.ToString());

            var nok = Fallible.FromError(Error);

            Assert.Contains(Error.ToString(), nok.ToString(), StringComparison.OrdinalIgnoreCase);
        }
Пример #3
0
        public static void ToString1()
        {
            var value = new Obj("My value");
            var ok    = Fallible.Of(value);

            Assert.Contains(value.ToString(), ok.ToString(), StringComparison.OrdinalIgnoreCase);

            var nok = Fallible <Obj> .FromError(Error);

            Assert.Contains(Error.ToString(), nok.ToString(), StringComparison.OrdinalIgnoreCase);
        }
Пример #4
0
        public static void ToString1()
        {
            var value = new Obj("My value");
            var ok    = Result <Obj, Obj> .Of(value);

            Assert.Contains(value.ToString(), ok.ToString(), StringComparison.OrdinalIgnoreCase);

            var error = new Obj("My error");
            var nok   = Result <Obj, Obj> .FromError(error);

            Assert.Contains(error.ToString(), nok.ToString(), StringComparison.OrdinalIgnoreCase);
        }
Пример #5
0
        public static void ToString4()
        {
            var either = Either <Obj, Obj> .OfRight(null);

            Assert.Contains("Right", either.ToString(), StringComparison.OrdinalIgnoreCase);
        }