コード例 #1
0
        public void TestBaseBLAttribute_FormerName()
        {
            var fileName  = @"..\..\..\..\Test\Data\interface_demo.1.ceusdl";
            var data      = new ParsableData(System.IO.File.ReadAllText(fileName), fileName);
            var p         = new FileParser(data);
            var result    = p.Parse();
            var coreModel = new CoreModel(result);
            var blModel   = new BLModel(coreModel);

            // Auswählen
            var blIfa  = (DefaultBLInterface)blModel.Interfaces[0];
            var blAttr = (BaseBLAttribute)blIfa.Attributes.Where(a => a.ShortName == "KURZBEZ").First();

            Assert.AreEqual("AP_def_Semester", blIfa.Name);
            Assert.AreEqual("Semester_KURZBEZ", blAttr.Name);
            Assert.AreEqual("Sem_KurzBezeichnung", blAttr.FormerName);
            Assert.AreEqual("AP_def_Sem.Sem_KurzBezeichnung", blAttr.FullFormerName);
        }
コード例 #2
0
        public void TestInterfaceRenamed_Complex()
        {
            var fileName = @"..\..\..\..\Test\Data\interface_demo.3.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 BLModel(model);

            // Auswählen
            var ifa = blModel.Interfaces[0];

            using (var con = new SqlConnection("Data Source=localhost;Initial Catalog=FH_AP_BaseLayer;Integrated Security=True;Application Name=\"CEUSDL Tests\"")) {
                con.Open();
                var  ana = new ModificationAnalyzer(blModel, con);
                bool tex = ana.InterfaceRenamed(ifa);
                Assert.IsTrue(tex);
            }
        }
コード例 #3
0
        public void TestRefBLAttribute_FormerName()
        {
            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 coreModel = new CoreModel(result);
            var blModel   = new BLModel(coreModel);

            var ifaLand  = (DefaultBLInterface)blModel.Interfaces[0];
            var attrKont = (RefBLAttribute)ifaLand.Attributes.Where(a => a.Name.Contains("Kontinent")).First();

            Assert.IsNotNull(attrKont);
            Assert.AreEqual("Kontinent_KNZ", attrKont.Name);
            Assert.AreEqual("Kont_Kontinent_KNZ", attrKont.FormerName);
            Assert.AreEqual("AP_BL_D_Land.Kont_Kontinent_KNZ", attrKont.FullFormerName);

            // Das wird noch interessant, denn was ist, wenn Attributbezeichnung und Tabellenbezeichnung
            // zu unterschiedlichen Zeitpunkten geändert werden?
        }
コード例 #4
0
 public DropBLGenerator(CoreModel model)
 {
     this.model = new BLModel(model);
 }
コード例 #5
0
 public GraphvizBLGenerator(CoreModel model) {
     this.model = new BLModel(model);
 }
コード例 #6
0
 public CreateDefDataGenerator(BLModel model)
 {
     this.model = model;
 }
コード例 #7
0
 public CreateDefDataGenerator(CoreModel model)
 {
     this.model = new BLModel(model);
 }
コード例 #8
0
 public ModificationAnalyzer(BLModel model, SqlConnection con)
 {
     this.model = model;
     this.con   = con;
 }
コード例 #9
0
 public InitialDefaultValuesGenerator(BLModel model)
 {
     this.model = model;
 }
コード例 #10
0
 public InitialDefaultValuesGenerator(CoreModel model)
 {
     this.model = new BLModel(model);
 }
コード例 #11
0
 public LoadBLGenerator(BLModel model)
 {
     this.model = model;
 }
コード例 #12
0
 public CreateBLGenerator(BLModel model, bool generateConstraints)
 {
     this.generateConstraints = generateConstraints;
     this.model = model;
 }
コード例 #13
0
 public CreateBLGenerator(CoreModel model, bool generateConstraints)
 {
     this.generateConstraints = generateConstraints;
     this.model = new BLModel(model);
 }