Наследование: MappingBase
        public void ShouldWriteManyToManyElement()
        {
            var mapping = new IndexMapping { IsManyToMany = true };

            writer.VerifyXml(mapping)
                .RootElement.HasName("index-many-to-many");
        }
        public void ShouldWriteElement()
        {
            var mapping = new IndexMapping();

            writer.VerifyXml(mapping)
                .RootElement.HasName("index");
        }
        public void Should_produce_valid_hbm()
        {
            var index = new IndexMapping();
            var writer = new HbmIndexWriter();

            writer.ShouldGenerateValidOutput(index);
        }
        public void ShouldWriteColumns()
        {
            var mapping = new IndexMapping { IsManyToMany = true };

            mapping.AddColumn(new ColumnMapping());

            writer.VerifyXml(mapping)
                .Element("column").Exists();
        }
        public void ShouldWriteForeignKey()
        {
            var mapping = new IndexMapping { IsManyToMany = true };

            mapping.ForeignKey = "FKTest";

            writer.VerifyXml(mapping)
                .HasAttribute("foreign-key","FKTest");
        }
        public void ShouldWriteColumns()
        {
            var mapping = new IndexMapping();

            mapping.AddColumn(Layer.Defaults, new ColumnMapping());

            writer.VerifyXml(mapping)
                .Element("column").Exists();
        }
Пример #7
0
 public bool Equals(IndexMapping other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.attributes, attributes) &&
            other.columns.ContentEquals(columns) &&
            Equals(other.ContainingEntityType, ContainingEntityType));
 }
 public virtual void ProcessIndex(IndexMapping indexMapping)
 {
 }
Пример #9
0
 public IndexInstance(IndexMapping mapping)
     : base(mapping)
 {
     this.mapping = mapping;
 }
 public void CreateDsl()
 {
     mapping = new IndexMapping();
     inspector = new IndexInspector(mapping);
 }
 public override void ProcessIndex(IndexMapping indexMapping)
 {
     ProcessIndex((IIndexMapping)indexMapping);
 }
 public IndexManyToManyInspector(IndexMapping mapping)
 {
     this.mapping = mapping;
     mappedProperties.Map(x => x.Class, x => x.Type);
 }
Пример #13
0
 public IndexInspector(IndexMapping mapping)
 {
     this.mapping = mapping;
 }
 public virtual void Visit(IndexMapping indexMapping)
 {
 }
Пример #15
0
 public IndexInspector(IndexMapping mapping)
 {
     this.mapping = mapping;
     mappedProperties.AutoMap();
 }