예제 #1
0
        public void DoesNotReportWhenShouldNot()
        {
            var analyzer = new MyElementAnalyzer();

            var testElement = CustomAnalysisTestHelper.StringToElement("<MyElement IsEnabled=\"False\" />");

            var analysisResult = analyzer.Analyze(testElement, new ExtraAnalysisDetails());

            Assert.IsTrue(analysisResult.IsNone);
        }
예제 #2
0
        public void DoesReportWhenShould()
        {
            var analyzer = new MyElementAnalyzer();

            var testElement = CustomAnalysisTestHelper.StringToElement("<MyElement />");

            var analysisResult = analyzer.Analyze(testElement, new ExtraAnalysisDetails());

            Assert.AreEqual(1, analysisResult.Actions.Count);
            Assert.AreEqual(ActionType.AddAttribute, analysisResult.Actions[0].Action);
            Assert.AreEqual("IsEnabled", analysisResult.Actions[0].Name);
        }