private static TypeMetadata BuildProxyMetadata()
        {
            var definition = new InterfaceProxyDefinition(typeof(IShape), null);
            var metadataBuilder = new InterfaceProxyMetadataBuilder(definition);

            return metadataBuilder.Build();
        }
Exemplo n.º 2
0
        public void CanBuildInterfaceProxy()
        {
            var proxyDefinition = new InterfaceProxyDefinition(typeof(IShape), null);

            var type = _builder.Build(proxyDefinition);

            Assert.IsNotNull(type);
            Assert.That(typeof(IShape).IsAssignableFrom(type));
        }
Exemplo n.º 3
0
        public void ProxyGeneratedWithDefaultConstructorOnInterfaceTypes()
        {
            var proxyDefinition = new InterfaceProxyDefinition(typeof(IShape), null);

            var type = _builder.Build(proxyDefinition);

            Assert.That(type.GetConstructors().Length == 1);
        }