public void CannotMapOpenTypesWithMismatchedArity()
        {
            var registry = new LogicalTypeRegistry();

            registry.Invoking(x => x.AddMapping(LogicalType.Parse("syn:Maybe"), typeof(Maybe<>)))
                .ShouldThrow<ArgumentException>();

            registry.Invoking(x => x.AddMapping(LogicalType.Parse("syn:Maybe`2"), typeof(Maybe<>)))
                .ShouldThrow<ArgumentException>();
        }
        public void CannotMapClosedLogicalTypeToOpenActualType()
        {
            var logicalType = LogicalType.Parse("syn:Maybe<sys:Int32>");
            var actualType = typeof(Maybe<>);

            var registry = new LogicalTypeRegistry();
            registry.Invoking(x => x.AddMapping(logicalType, actualType))
                .ShouldThrow<ArgumentException>();
        }
        public void CannotAddDuplicateMappings()
        {
            var registry = new LogicalTypeRegistry();
            registry.AddMapping(LogicalType.Parse("sys:String"), typeof(string));

            registry.Invoking(x => x.AddMapping(LogicalType.Parse("sys:String"), typeof(int)))
                .ShouldThrow<ArgumentException>();

            registry.Invoking(x => x.AddMapping(LogicalType.Parse("tst:Description"), typeof(string)))
                .ShouldThrow<ArgumentException>();
        }