Пример #1
0
        public void SolutionAnalysisRequester_Reanalyze_DoNotChangeOriginalFlagValue()
        {
            Option <bool> option = new Option <bool>(SolutionAnalysisRequester.OptionFeatureRuntime,
                                                     SolutionAnalysisRequester.OptionNameFullSolutionAnalysis, true);

            SolutionAnalysisRequester testSubject = new SolutionAnalysisRequester(this.serviceProvider, new AdhocWorkspace(), option);
            bool optionInitialValue = testSubject.GetOptionValue();

            // Act
            testSubject.ReanalyzeSolution();

            // Verify
            Assert.AreEqual(optionInitialValue,
                            testSubject.GetOptionValue(),
                            "Option should not be inverted");
        }
Пример #2
0
        public void SolutionAnalysisRequester_FlipFullSolutionAnalysisFlag()
        {
            Option <bool> option = new Option <bool>(SolutionAnalysisRequester.OptionFeatureRuntime,
                                                     SolutionAnalysisRequester.OptionNameFullSolutionAnalysis, true);

            SolutionAnalysisRequester testSubject = new SolutionAnalysisRequester(this.serviceProvider, new AdhocWorkspace(), option);
            bool optionInitialValue = testSubject.GetOptionValue();

            // Act
            testSubject.FlipFullSolutionAnalysisFlag();

            // Verify
            Assert.AreEqual(!optionInitialValue,
                            testSubject.GetOptionValue(),
                            "Option should be inverted");
        }