Detect() 공개 메소드

public Detect ( AssemblyDiffCollection assemblyDiffCollection ) : bool
assemblyDiffCollection Endjin.Assembly.ChangeDetection.Diff.AssemblyDiffCollection
리턴 bool
        public AnalysisResult Analyze(string previousAssembly, string currentAssembly, string proposedVersionNumber)
        {
            var differ = new DiffAssemblies();

            var previous = new FileQuery(previousAssembly);
            var current = new FileQuery(currentAssembly);

            var differences = differ.Execute(new List<FileQuery>
            {
                previous
            }, 
            new List<FileQuery>
            {
                current
            });

            var rule = new BreakingChangeRule();

            var breakingChange = rule.Detect(differences);

            if (breakingChange)
            {
                var semVer = SemVersion.Parse(proposedVersionNumber);

                var decidedVersionNumber = semVer.Change(semVer.Major + 1, 0, 0);

                proposedVersionNumber = decidedVersionNumber.ToString();
            }

            return new AnalysisResult
            {
                BreakingChangesDetected = breakingChange,
                VersionNumber = proposedVersionNumber
            };
        }
        public void WhenICompareTheTwoAssembliesAndValidateTheRules()
        {
            var differ = new DiffAssemblies();

            var previous = new FileQuery(ScenarioContext.Current.Get<string>("PreviousAssembly"));
            var newAssembly = new FileQuery(ScenarioContext.Current.Get<string>("NewAssembly"));

            var differences = differ.Execute(new List<FileQuery> { previous }, new List<FileQuery> { newAssembly });
            var rule = new BreakingChangeRule();

            var result = rule.Detect(differences);

            ScenarioContext.Current.Set(result, "Results");
        }