Esempio n. 1
0
        private static void CheckTableInfo(IMetaDataProvider fluentCfg)
        {
            var metas   = fluentCfg.CreateMetaData(null);
            var entMeta = metas[typeof(StrTestEntity)];

            var result = entMeta.ClassMetas.OfType <AuditTableAttribute>().Single();

            result.Catalog.Should().Be.EqualTo("testcatalog");
            result.Schema.Should().Be.EqualTo("testschema");
            result.Value.Should().Be.EqualTo("tableName");
        }
Esempio n. 2
0
        private IDictionary <System.Type, IEntityMeta> initializeMetas(IMetaDataProvider metaDataProvider,
                                                                       IEnumerable <IMetaDataAdder> metaDataAdders)
        {
            var metaData = metaDataProvider.CreateMetaData(_nhConfiguration);

            foreach (var metaDataAdder in metaDataAdders)
            {
                metaDataAdder.AddMetaDataTo(metaData);
            }
            return(metaData);
        }
Esempio n. 3
0
        private static void CheckJoinTableInfo(IMetaDataProvider fluentCfg)
        {
            var metas   = fluentCfg.CreateMetaData(null);
            var entMeta = metas[typeof(SetRefCollEntity)];

            var result = entMeta.MemberMetas[typeof(SetRefCollEntity).GetProperty("Collection")]
                         .OfType <AuditJoinTableAttribute>().Single();

            result.Catalog.Should().Be.EqualTo("testcatalog");
            result.Schema.Should().Be.EqualTo("testschema");
            result.TableName.Should().Be.EqualTo("tableName");
            result.InverseJoinColumns.Should().Have.SameSequenceAs("donald", "duck");
        }