コード例 #1
0
        public void TestBTAttribute_RefAttributesNaming()
        {
            // Daten einlesen aus Datei ohne Config-Section
            var fileName = @"..\..\..\..\Test\Data\interface_demo.2.ceusdl";
            var data     = new ParsableData(System.IO.File.ReadAllText(fileName), fileName);
            var p        = new FileParser(data);
            var result   = p.Parse();
            var model    = new CoreModel(result);
            var blModel  = new BL.BLModel(model);
            var btModel  = new BTModel(blModel);

            Assert.AreEqual(3, btModel.Interfaces.Count);
            Assert.AreEqual("AP", btModel.Config.Prefix);
            Assert.AreEqual("FH_AP_BaseLayer", btModel.Config.BTDatabase);

            var btIfa = btModel.Interfaces[0];

            Assert.AreEqual("AP_BT_D_Land", btIfa.Name);

            var btAttr1 = btIfa.Attributes[6];

            Assert.IsTrue(btAttr1 is RefBTAttribute);
            var refAttr = (RefBTAttribute)btAttr1;

            Assert.AreEqual("Kontinent_KNZ", refAttr.KnzAttribute.Name);
            Assert.AreEqual("Kontinent_ID", refAttr.IdAttribute.Name);
            Assert.AreEqual(CoreDataType.VARCHAR, refAttr.KnzAttribute.DataType);
            Assert.AreEqual(CoreDataType.INT, refAttr.IdAttribute.DataType);
            Assert.AreEqual("varchar(50)", refAttr.KnzAttribute.SqlDataType);
            Assert.AreEqual("int", refAttr.IdAttribute.SqlDataType);

            var btAttr2 = btIfa.Attributes[7];

            Assert.IsTrue(btAttr2 is RefBTAttribute);
            refAttr = (RefBTAttribute)btAttr2;
            Assert.AreEqual("ExistiertSeit_Semester_KNZ", refAttr.KnzAttribute.Name);
            Assert.AreEqual("ExistiertSeit_Semester_ID", refAttr.IdAttribute.Name);
            Assert.AreEqual("Semester_KNZ", refAttr.KnzAttribute.ShortName);
            Assert.AreEqual("Semester_ID", refAttr.IdAttribute.ShortName);
            Assert.AreEqual("ExistiertSeit", refAttr.KnzAttribute.Alias);
            Assert.AreEqual("ExistiertSeit", refAttr.IdAttribute.Alias);
        }
コード例 #2
0
        public void TestBTModel_WithMandantAndHistoryFile2()
        {
            // Daten einlesen aus Datei ohne Config-Section
            var fileName = @"..\..\..\..\Test\Data\interface_demo.6.ceusdl";
            var data     = new ParsableData(System.IO.File.ReadAllText(fileName), fileName);
            var p        = new FileParser(data);
            var result   = p.Parse();
            var model    = new CoreModel(result);
            var blModel  = new BL.BLModel(model);
            var btModel  = new BTModel(blModel);

            Assert.AreEqual(4, btModel.Interfaces.Count);
            Assert.AreEqual("AP", btModel.Config.Prefix);
            Assert.AreEqual("FH_AP_BaseLayer", btModel.Config.BLDatabase);
            Assert.AreEqual("FH_AP_BaseLayer", btModel.Config.BTDatabase);

            var btIfa = btModel.Interfaces[0];

            Assert.AreEqual("Land", btIfa.ShortName);
            Assert.AreEqual("AP_BT_D_Land", btIfa.Name);
            Assert.AreEqual("FH_AP_BaseLayer.dbo.AP_BT_D_Land", btIfa.FullName);

            var btIfaV = btModel.Interfaces[1];

            Assert.AreEqual("AP_BT_D_Land_VERSION", btIfaV.Name);

            var identity = (BaseBTAttribute)btIfaV.Attributes[0];

            Assert.AreEqual("Land_VERSION_ID", identity.Name);
            Assert.IsTrue(identity.IsIdentity);

            var reference = (RefBTAttribute)btIfaV.Attributes[2];

            Assert.AreEqual("Land_ID", reference.IdAttribute.Name);
            Assert.AreEqual("Land_KNZ", reference.KnzAttribute.Name);
            Assert.AreEqual("AP_BL_D_Land", reference.ReferencedBLInterface.Name);
            Assert.AreEqual("AP_BT_D_Land", reference.ReferencedBTInterface.Name);
            Assert.AreEqual("Land_ID", ((BaseBTAttribute)(reference.ReferencedBTAttribute)).Name);
            Assert.AreEqual("Land_KNZ", reference.ReferencedBLAttribute.Name);
        }
コード例 #3
0
        public void TestBTModel_WithMandantAndHistoryFile()
        {
            // Daten einlesen aus Datei ohne Config-Section
            var fileName = @"..\..\..\..\Test\Data\interface_demo.5.ceusdl";
            var data     = new ParsableData(System.IO.File.ReadAllText(fileName), fileName);
            var p        = new FileParser(data);
            var result   = p.Parse();
            var model    = new CoreModel(result);
            var blModel  = new BL.BLModel(model);
            var btModel  = new BTModel(blModel);

            Assert.AreEqual(3, btModel.Interfaces.Count);
            Assert.AreEqual("AP", btModel.Config.Prefix);
            Assert.AreEqual("FH_AP_BaseLayer", btModel.Config.BLDatabase);
            Assert.AreEqual("FH_AP_BaseLayer", btModel.Config.BTDatabase);

            var btIfa = btModel.Interfaces[0];

            Assert.AreEqual("Land", btIfa.ShortName);
            Assert.AreEqual("AP_BT_D_Land", btIfa.Name);
            Assert.AreEqual("FH_AP_BaseLayer.dbo.AP_BT_D_Land", btIfa.FullName);
        }
コード例 #4
0
        public void TestBTModel_BySimpleFile()
        {
            // Daten einlesen aus Datei ohne Config-Section
            var fileName = @"..\..\..\..\Test\Data\interface_demo.ceusdl";
            var data     = new ParsableData(System.IO.File.ReadAllText(fileName), fileName);
            var p        = new FileParser(data);
            var result   = p.Parse();
            var model    = new CoreModel(result);
            var blModel  = new BL.BLModel(model);
            var btModel  = new BTModel(blModel);

            Assert.AreEqual(1, btModel.Interfaces.Count);
            Assert.AreEqual(null, btModel.Config.Prefix);
            Assert.AreEqual(null, btModel.Config.BLDatabase);
            Assert.AreEqual(null, btModel.Config.BTDatabase);

            var btIfa = btModel.Interfaces[0];

            Assert.AreEqual("Semester", btIfa.ShortName);
            Assert.AreEqual("BT_D_Semester", btIfa.Name);
            Assert.AreEqual("dbo.BT_D_Semester", btIfa.FullName);
        }
コード例 #5
0
 public SnowflakeALModel(BTModel parent) : base(parent)
 {
 }
コード例 #6
0
 public StarALModel(BTModel parent) : base(parent)
 {
     InitializeStarDimensionTables();
 }
コード例 #7
0
 public DropBTGenerator(BTModel model)
 {
     this.model = model;
 }
コード例 #8
0
 public DropBTGenerator(CoreModel model)
 {
     this.model = new BTModel(model);
 }
コード例 #9
0
 public GraphvizBTGenerator(BTModel model)
 {
     this.model = model;
 }
コード例 #10
0
 public GraphvizBTGenerator(CoreModel model)
 {
     this.model = new BTModel(model);
 }
コード例 #11
0
 public ALModel(BTModel parent)
 {
     this.parent = parent;
     this.Config = new ALConfig(parent.ParentModel.Core.Config);
     PrepareFactInterfaces();
 }
コード例 #12
0
 public CreateBTGenerator(BTModel model)
 {
     this.model = model;
 }
コード例 #13
0
 public CreateBTGenerator(CoreModel model)
 {
     this.model = new BTModel(model);
 }
コード例 #14
0
 public LoadBTGenerator(BTModel model)
 {
     this.model = model;
 }