Beispiel #1
0
        private static ImportAttribute GetImportAttribute(ImportBuilder builder)
        {
            var list = new List <Attribute>();

            builder.BuildAttributes(typeof(FooImpl), ref list);
            Assert.AreEqual(1, list.Count);
            return(list[0] as ImportAttribute);
        }
        public void AsMany_ChangesGeneratedAttributeToImportMany()
        {
            var builder = new ImportBuilder();

            builder.AsMany();

            var list = new List <Attribute>();

            builder.BuildAttributes(typeof(FooImpl), ref list);
            Assert.Equal(1, list.Count);
            var att = list[0] as ImportManyAttribute;

            Assert.NotNull(att);
            Assert.Null(att.ContractName);
            Assert.Null(att.ContractType);
        }