Ejemplo n.º 1
0
        protected void CheckFileExists(ICheckNotifier notifier, string filePath)
        {
            var file = new FileInfo(filePath);

            if (!file.Exists)
            {
                notifier.OnCheckPerformed(new CheckEventArgs("File: " + file.FullName + " was not found", CheckResult.Fail));
                Releasability = Releaseability.ExtractFilesMissing;
            }
        }
Ejemplo n.º 2
0
        public virtual void Check(ICheckNotifier notifier)
        {
            if (GlobalResult == null) // this should be already covered by the NoGlobalPotential
            {
                return;
            }

            if (GlobalResult.SQLExecuted != null)
            {
                var table = RelatedGlobal as SupportingSQLTable;
                if (table == null)
                {
                    notifier.OnCheckPerformed(new CheckEventArgs("The executed Global " + GlobalResult.ExtractedName +
                                                                 " has a SQL script but the extracted type (" + GlobalResult.ReferencedObjectType +
                                                                 ") is not a SupportingSQLTable", CheckResult.Fail));
                    Releasability = Releaseability.ExtractionSQLDesynchronisation;
                }
                if (table.SQL != GlobalResult.SQLExecuted)
                {
                    notifier.OnCheckPerformed(new CheckEventArgs("The executed Global " + GlobalResult.ExtractedName +
                                                                 " has a SQL script which is different from the current one!", CheckResult.Fail));
                    Releasability = Releaseability.ExtractionSQLDesynchronisation;
                }
            }

            if (GlobalResult.IsReferenceTo(typeof(SupportingDocument)))
            {
                CheckFileExists(notifier, GlobalResult.DestinationDescription);
            }
            else
            {
                CheckDestination(notifier, GlobalResult);
            }

            if (Releasability == Releaseability.Undefined)
            {
                Releasability = Releaseability.Releaseable;
            }
        }