public void UnapprovedTestUtilitiesNamespace_ApproveNamespaceExternally_NoDiagnostic() { var sampleCode = @" namespace <?>NationalInstruments.TestUtilities.SourceModel { class Program { static void Main(string[] args) { } } }"; using (var testState = new TestState()) { var approvedNamespaceFiles = testState.GetApprovedNamespaces(); var test = new AutoTestFile(sampleCode, new Rule(ApprovedNamespaceAnalyzer.TestRule, "NationalInstruments.TestUtilities.SourceModel", testState.ApprovedTestNamespacesFilePath)); var testAfterFix = new AutoTestFile(sampleCode.Replace("<?>", string.Empty)); VerifyDiagnostics(test, approvedNamespaceFiles); testState.AppendToApprovedTestNamespacesFile("\r\nNationalInstruments.TestUtilities.SourceModel"); VerifyDiagnostics(testAfterFix, approvedNamespaceFiles); } }