public void ShouldWriteOnDeleteAttribute()
        {
            var testHelper = new XmlWriterTestHelper<KeyMapping>();
            testHelper.Check(x => x.OnDelete, "cascade").MapsToAttribute("on-delete");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteUnsavedValueAttribute()
        {
            var testHelper = new XmlWriterTestHelper<IdMapping>();
            testHelper.Check(x => x.UnsavedValue, "u-value").MapsToAttribute("unsaved-value");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteNameAttribute()
        {
            var testHelper = new XmlWriterTestHelper<IdMapping>();
            testHelper.Check(x => x.Name, "name").MapsToAttribute("name");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteNotNullAttribute()
        {
            var testHelper = new XmlWriterTestHelper<KeyMapping>();
            testHelper.Check(x => x.NotNull, true).MapsToAttribute("not-null");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteTypeAttribute()
        {
            var testHelper = new XmlWriterTestHelper<IdMapping>();
            testHelper.Check(x => x.Type, new TypeReference("type")).MapsToAttribute("type");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteEntityNameAttribute()
        {
            var testHelper = new XmlWriterTestHelper<TuplizerMapping>();
            testHelper.Check(x => x.EntityName, "test").MapsToAttribute("entity-name", "test");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteAccessAttribute()
        {
            var testHelper = new XmlWriterTestHelper<IdMapping>();
            testHelper.Check(x => x.Access, "access").MapsToAttribute("access");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteEntityName()
        {
            var testHelper = new XmlWriterTestHelper<OneToManyMapping>();
            testHelper.Check(x => x.EntityName, "name1").MapsToAttribute("entity-name");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteModeAttribute()
        {
            var testHelper = new XmlWriterTestHelper<TuplizerMapping>();
            testHelper.Check(x => x.Mode, TuplizerMode.DynamicMap).MapsToAttribute("entity-mode", "dynamic-map");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteClassAttribute()
        {
            var testHelper = new XmlWriterTestHelper<OneToManyMapping>();
            testHelper.Check(x => x.Class, new TypeReference("type")).MapsToAttribute("class");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteNotFoundAttribute()
        {
            var testHelper = new XmlWriterTestHelper<OneToManyMapping>();
            testHelper.Check(x => x.NotFound, "nf").MapsToAttribute("not-found");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteFormulaAttribute()
        {
            var testHelper = new XmlWriterTestHelper<DiscriminatorMapping>();
            testHelper.Check(x => x.Formula, "f").MapsToAttribute("formula");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteInsertAttribute()
        {
            var testHelper = new XmlWriterTestHelper<DiscriminatorMapping>();
            testHelper.Check(x => x.Insert, true).MapsToAttribute("insert");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteMappedAttribute()
        {
            var testHelper = new XmlWriterTestHelper<CompositeIdMapping>();
            testHelper.Check(x => x.Mapped, true).MapsToAttribute("mapped");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteLengthAttribute()
        {
            var testHelper = new XmlWriterTestHelper<KeyPropertyMapping>();
            testHelper.Check(x => x.Length, 8).MapsToAttribute("length");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteForeignKeyAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ManyToManyMapping>();
            testHelper.Check(x => x.ForeignKey, "fk").MapsToAttribute("foreign-key");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteLazyAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ManyToManyMapping>();
            testHelper.Check(x => x.Lazy, true).MapsToAttribute("lazy");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteBatchSizeAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ClassMapping>();
            testHelper.Check(x => x.BatchSize, 10).MapsToAttribute("batch-size");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteFetchAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ManyToManyMapping>();
            testHelper.Check(x => x.Fetch, "f").MapsToAttribute("fetch");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteUpdateAttribute()
        {
            var testHelper = new XmlWriterTestHelper<PropertyMapping>();
            testHelper.Check(x => x.Update, true).MapsToAttribute("update");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteAbstractAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ClassMapping>();
            testHelper.Check(x => x.Abstract, true).MapsToAttribute("abstract");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteGeneratedAttribute()
        {
            var testHelper = new XmlWriterTestHelper<PropertyMapping>();
            testHelper.Check(x => x.Generated, "gen").MapsToAttribute("generated");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteIdTypeAttribute()
        {
            var testHelper = new XmlWriterTestHelper<AnyMapping>();
            testHelper.Check(x => x.IdType, "id").MapsToAttribute("id-type");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteGenericAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ArrayMapping>();
            testHelper.Check(x => x.Generic, true).MapsToAttribute("generic");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteDiscriminatorValueAttribute()
        {
            var testHelper = new XmlWriterTestHelper<SubclassMapping>();
            testHelper.Check(x => x.DiscriminatorValue, "val").MapsToAttribute("discriminator-value");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteCheckAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ArrayMapping>();
            testHelper.Check(x => x.Check, "ck").MapsToAttribute("check");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteCollectionTypeAttribute()
        {
            var testHelper = new XmlWriterTestHelper<ArrayMapping>();
            testHelper.Check(x => x.CollectionType, new TypeReference("type")).MapsToAttribute("collection-type");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteCascadeAttribute()
        {
            var testHelper = new XmlWriterTestHelper<AnyMapping>();
            testHelper.Check(x => x.Cascade, "all").MapsToAttribute("cascade");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteUniqueAttribute()
        {
            var testHelper = new XmlWriterTestHelper<KeyMapping>();
            testHelper.Check(x => x.Unique, true).MapsToAttribute("unique");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteOptimisticLockAttribute()
        {
            var testHelper = new XmlWriterTestHelper<PropertyMapping>();
            testHelper.Check(x => x.OptimisticLock, true).MapsToAttribute("optimistic-lock");

            testHelper.VerifyAll(writer);
        }
示例#31
0
        public void ShouldWriteNotFoundAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ManyToManyMapping>();

            testHelper.Check(x => x.NotFound, "exception").MapsToAttribute("not-found");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteForeignKeyAttribute()
        {
            var testHelper = new XmlWriterTestHelper <KeyManyToOneMapping>();

            testHelper.Check(x => x.ForeignKey, "fk").MapsToAttribute("foreign-key");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteClassAttribute()
        {
            var testHelper = new XmlWriterTestHelper <KeyManyToOneMapping>();

            testHelper.Check(x => x.Class, new TypeReference("type")).MapsToAttribute("class");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteNameAttribute()
        {
            var testHelper = new XmlWriterTestHelper <KeyManyToOneMapping>();

            testHelper.Check(x => x.Name, "name").MapsToAttribute("name");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteAccessAttribute()
        {
            var testHelper = new XmlWriterTestHelper <KeyManyToOneMapping>();

            testHelper.Check(x => x.Access, "access").MapsToAttribute("access");

            testHelper.VerifyAll(writer);
        }
示例#36
0
        static XmlWriterTestHelper <CollectionMapping> Helper()
        {
            var helper = new XmlWriterTestHelper <CollectionMapping>();

            helper.CreateInstance(CollectionMapping.Bag);

            return(helper);
        }
示例#37
0
        public void ShouldWriteWhereAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ManyToManyMapping>();

            testHelper.Check(x => x.Where, "x = 1").MapsToAttribute("where");

            testHelper.VerifyAll(writer);
        }
示例#38
0
        public void ShouldWriteFetchAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ManyToManyMapping>();

            testHelper.Check(x => x.Fetch, "f").MapsToAttribute("fetch");

            testHelper.VerifyAll(writer);
        }
示例#39
0
        public void ShouldWriteNotNull()
        {
            var testHelper = new XmlWriterTestHelper <ElementMapping>();

            testHelper.Check(x => x.NotNull, true).MapsToAttribute("not-null");

            testHelper.VerifyAll(writer);
        }
示例#40
0
        public void ShouldWriteLazyAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ManyToManyMapping>();

            testHelper.Check(x => x.Lazy, true).MapsToAttribute("lazy");

            testHelper.VerifyAll(writer);
        }
示例#41
0
        public void ShouldWritePrecision()
        {
            var testHelper = new XmlWriterTestHelper <ElementMapping>();

            testHelper.Check(x => x.Precision, 10).MapsToAttribute("precision");

            testHelper.VerifyAll(writer);
        }
示例#42
0
        public void ShouldWriteUnique()
        {
            var testHelper = new XmlWriterTestHelper <ElementMapping>();

            testHelper.Check(x => x.Unique, true).MapsToAttribute("unique");

            testHelper.VerifyAll(writer);
        }
示例#43
0
        public void ShouldWriteLength()
        {
            var testHelper = new XmlWriterTestHelper <ElementMapping>();

            testHelper.Check(x => x.Length, 50).MapsToAttribute("length");

            testHelper.VerifyAll(writer);
        }
示例#44
0
        public void ShouldWriteScale()
        {
            var testHelper = new XmlWriterTestHelper <ElementMapping>();

            testHelper.Check(x => x.Scale, 10).MapsToAttribute("scale");

            testHelper.VerifyAll(writer);
        }
示例#45
0
        public void ShouldWritePersisterAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Persister, "p").MapsToAttribute("persister");

            testHelper.VerifyAll(writer);
        }
示例#46
0
        public void ShouldWriteFormula()
        {
            var testHelper = new XmlWriterTestHelper <ElementMapping>();

            testHelper.Check(x => x.Formula, "formula").MapsToAttribute("formula");

            testHelper.VerifyAll(writer);
        }
示例#47
0
        public void ShouldWriteMutableAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Mutable, true).MapsToAttribute("mutable");

            testHelper.VerifyAll(writer);
        }
示例#48
0
        public void ShouldWriteBatchSizeAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.BatchSize, 10).MapsToAttribute("batch-size");

            testHelper.VerifyAll(writer);
        }
示例#49
0
        public void ShouldWriteSchemaAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Schema, "dbo").MapsToAttribute("schema");

            testHelper.VerifyAll(writer);
        }
示例#50
0
        public void ShouldWritePolymorphismAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Polymorphism, "poly").MapsToAttribute("polymorphism");

            testHelper.VerifyAll(writer);
        }
示例#51
0
        public void ShouldWriteEntityNameAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.EntityName, "entity1").MapsToAttribute("entity-name");

            testHelper.VerifyAll(writer);
        }
示例#52
0
        public void ShouldWriteDiscriminatorValueAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.DiscriminatorValue, "val").MapsToAttribute("discriminator-value");

            testHelper.VerifyAll(writer);
        }
示例#53
0
        public void ShouldWriteAbstractAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Abstract, true).MapsToAttribute("abstract");

            testHelper.VerifyAll(writer);
        }
示例#54
0
        public void ShouldWriteTableAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.TableName, "tbl").MapsToAttribute("table");

            testHelper.VerifyAll(writer);
        }
示例#55
0
        public void ShouldWriteDynamicInsertAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.DynamicInsert, true).MapsToAttribute("dynamic-insert");

            testHelper.VerifyAll(writer);
        }
示例#56
0
        public void ShouldWriteSubselectAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Subselect, "val").MapsToAttribute("subselect");

            testHelper.VerifyAll(writer);
        }
示例#57
0
        public void ShouldWriteOptimisticLockAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.OptimisticLock, "lock").MapsToAttribute("optimistic-lock");

            testHelper.VerifyAll(writer);
        }
示例#58
0
        public void ShouldWriteSelectBeforeUpdateAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.SelectBeforeUpdate, true).MapsToAttribute("select-before-update");

            testHelper.VerifyAll(writer);
        }
        public void ShouldWriteGenericAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ArrayMapping>();

            testHelper.Check(x => x.Generic, true).MapsToAttribute("generic");

            testHelper.VerifyAll(writer);
        }
示例#60
0
        public void ShouldWriteCheckAttribute()
        {
            var testHelper = new XmlWriterTestHelper <ClassMapping>();

            testHelper.Check(x => x.Check, "chk").MapsToAttribute("check");

            testHelper.VerifyAll(writer);
        }