Beispiel #1
0
        public bool AnalizeCruise()
        {
            var srcFile  = GetTempFilePath(".crz3", "HasDesignKeyChanges_srcFile");
            var destFile = GetTempFilePath(".crz3", "HasDesignKeyChanges_destFile");

            var cruiseID = CruiseID;

            using (var srcDb = CreateDatabaseFile(srcFile))
                using (var destDb = CreateDatabaseFile(destFile))
                {
                    var cruiseChecker = new CruiseChecker();

                    var cruiseConflicts    = cruiseChecker.GetCruiseConflicts(srcDb, destDb, cruiseID);
                    var isCruiseInConflict = cruiseConflicts.Any();

                    var saleConflicts    = cruiseChecker.GetSaleConflicts(srcDb, destDb, cruiseID);
                    var isSaleInConflict = saleConflicts.Any();


                    var plotConflicts       = cruiseChecker.GetPlotConflicts(srcDb, destDb, cruiseID);
                    var treeConflicts       = cruiseChecker.GetTreeConflicts(srcDb, destDb, cruiseID);
                    var logConflicts        = cruiseChecker.GetLogConflicts(srcDb, destDb, cruiseID);
                    var hasDesignKeyChanges = cruiseChecker.HasDesignKeyChanges(srcDb, destDb, cruiseID);

                    return(plotConflicts.Count() == 0 &&
                           treeConflicts.Count() == 0 &&
                           logConflicts.Count() == 0 &&
                           !hasDesignKeyChanges &&
                           !isCruiseInConflict &&
                           !isSaleInConflict);
                }
        }
Beispiel #2
0
        public void GetLogConflicts()
        {
            var srcFile  = GetTempFilePath(".crz3", "GetLogConflicts_srcFile");
            var destFile = GetTempFilePath(".crz3", "GetLogConflicts_destFile");

            using (var srcDb = CreateDatabaseFile(srcFile))
                using (var desDb = CreateDatabaseFile(destFile))
                {
                    var cc = new CruiseChecker();

                    var result = cc.GetLogConflicts(srcDb, desDb, CruiseID);
                    result.Should().BeEmpty();
                }
        }