public void DoesNotFindIssue_WhenNoneExists() { var xaml = "<Foo Bar=\"Enabled\">"; var rxElement = CustomAnalysisTestHelper.StringToElement(xaml); var sut = new FooAnalysis(); var actual = sut.Analyze(rxElement, FakeExtraAnalysisDetails.Create()); Assert.AreEqual(0, actual.Actions.Count); Assert.IsTrue(actual.IsNone); }
public void FindsIssue_WhenExists() { var xaml = @"<Foo />"; var rxElement = CustomAnalysisTestHelper.StringToElement(xaml); var sut = new FooAnalysis(); var actual = sut.Analyze(rxElement, FakeExtraAnalysisDetails.Create()); Assert.AreEqual(1, actual.Actions.Count); Assert.AreEqual(ActionType.AddAttribute, actual.Actions[0].Action); }