Beispiel #1
0
        public void AsContractType_SetsContractType()
        {
            var builder = new ExportBuilder();

            builder.AsContractType(typeof(IFoo));

            ExportAttribute exportAtt = GetExportAttribute(builder);

            Assert.Equal(typeof(IFoo), exportAtt.ContractType);
            Assert.Null(exportAtt.ContractName);
        }
Beispiel #2
0
        public void AsContractName_AndContractType_SetsContractNameAndType()
        {
            var builder = new ExportBuilder();

            builder.AsContractName("hey");
            builder.AsContractType(typeof(IFoo));

            ExportAttribute exportAtt = GetExportAttribute(builder);

            Assert.AreEqual("hey", exportAtt.ContractName);
            Assert.AreEqual(typeof(IFoo), exportAtt.ContractType);
        }