public void TestClashingIndicies()
        {
            TypeMetadataBuilder <PoffedClashingIndicies>             builder = new TypeMetadataBuilder <PoffedClashingIndicies>();
            IVisitor <TypeMetadataBuilder <PoffedClashingIndicies> > visitor = new AnnotationVisitor <TypeMetadataBuilder <PoffedClashingIndicies>, PoffedClashingIndicies>(true);

            builder.SetTypeId(1003);
            builder.Accept(visitor, typeof(PoffedClashingIndicies));

            ITypeMetadata <PoffedClashingIndicies> tmd = builder.Build();

            Assert.AreEqual(1003, tmd.Key.TypeId);
            Assert.AreEqual(3, tmd.GetAttribute("lastName").Index);
            Assert.AreEqual(1, tmd.GetAttribute("age").Index);
            Assert.AreEqual(2, tmd.GetAttribute("firstName").Index);
            Assert.AreEqual(0, tmd.GetAttribute("age2").Index);
        }
        public void TestHybridAnnotations()
        {
            TypeMetadataBuilder <PoffedHybridInspection>             builder = new TypeMetadataBuilder <PoffedHybridInspection>();
            IVisitor <TypeMetadataBuilder <PoffedHybridInspection> > visitor = new AnnotationVisitor <TypeMetadataBuilder <PoffedHybridInspection>, PoffedHybridInspection>(true);

            builder.SetTypeId(1006);
            builder.Accept(visitor, typeof(PoffedHybridInspection));

            ITypeMetadata <PoffedHybridInspection> tmd = builder.Build();

            Assert.AreEqual(1006, tmd.Key.TypeId);
            Assert.AreEqual(0, tmd.GetAttribute("adult").Index);
            Assert.AreEqual(1, tmd.GetAttribute("age").Index);
            Assert.AreEqual(2, tmd.GetAttribute("firstName").Index);
            Assert.AreEqual(3, tmd.GetAttribute("lastName").Index);
        }
        public void TestCustomCodec()
        {
            TypeMetadataBuilder <PoffedCustomCodec>             builder = new TypeMetadataBuilder <PoffedCustomCodec>();
            IVisitor <TypeMetadataBuilder <PoffedCustomCodec> > visitor = new AnnotationVisitor <TypeMetadataBuilder <PoffedCustomCodec>, PoffedCustomCodec>(true);

            builder.SetTypeId(1004);
            builder.Accept(visitor, typeof(PoffedCustomCodec));

            ITypeMetadata <PoffedCustomCodec> tmd = builder.Build();

            Assert.AreEqual(1004, tmd.Key.TypeId);
            Assert.AreEqual(0, tmd.GetAttribute("age").Index);
            Assert.AreEqual(1, tmd.GetAttribute("aliases").Index);
            Assert.AreEqual(2, tmd.GetAttribute("firstName").Index);
            Assert.AreEqual(3, tmd.GetAttribute("lastName").Index);
            Assert.IsInstanceOf(typeof(LinkedListCodec <string>), tmd.GetAttribute("aliases").Codec);
        }