Beispiel #1
0
        public void TestGenericNullRefConverter()
        {
            var converter = new GenericOptionJsonConverter(typeof(Maybe <>));

            Assert.True(converter.CanConvert(Maybes.None.GetType()));
            TestOptionsConverter(converter, Maybes.Some(Boxed.Of(42)));
        }
Beispiel #2
0
        public void TestGenericOptionConverter()
        {
            var converter = new GenericOptionJsonConverter(typeof(Option <>));

            Assert.True(converter.CanConvert(Option.None.GetType()));
            TestOptionsConverter(converter, Option.Some(Boxed.Of(42)));
        }