示例#1
0
        public void AsContractName_SetsContractName()
        {
            var builder = new ExportBuilder();

            builder.AsContractName("hey");

            ExportAttribute exportAtt = GetExportAttribute(builder);

            Assert.Equal("hey", exportAtt.ContractName);
            Assert.Null(exportAtt.ContractType);
        }
示例#2
0
        public void AsContractName_AndContractType_SetsContractNameAndType()
        {
            var builder = new ExportBuilder();

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

            ExportAttribute exportAtt = GetExportAttribute(builder);

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