Ejemplo n.º 1
0
        public void ExportInterfaceWithTypeOf1()
        {
            var builder = new ConventionBuilder();

            builder.ForType <FooImpl>().Export <IFoo>();

            var exports = builder.GetCustomAttributes(typeof(FooImpl), typeof(FooImpl).GetTypeInfo()).Where <Attribute>(e => e is ExportAttribute).Cast <ExportAttribute>();

            Assert.Equal(1, exports.Count());
            Assert.Equal(exports.First().ContractType, typeof(IFoo));
        }