Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DefineAccessorsForAttributeArgumentsTests.Fixer.cs (14)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
294await VerifyVB.VerifyCodeFixAsync(@"
306VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.DefaultRule).WithSpan(9, 20, 9, 24).WithArguments("name", "NoAccessorTestAttribute"),
329await new VerifyVB.Test
356VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.DefaultRule).WithSpan(9, 20, 9, 24).WithArguments("name", "SetterOnlyTestAttribute"),
394await new VerifyVB.Test
424VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.IncreaseVisibilityRule).WithSpan(14, 16, 14, 19).WithArguments("Name", "name"),
425VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.RemoveSetterRule).WithSpan(17, 9, 17, 12).WithArguments("Name", "name"),
462await VerifyVB.VerifyCodeFixAsync(@"
483VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.IncreaseVisibilityRule).WithSpan(14, 9, 14, 12).WithArguments("Name", "name"),
510await VerifyVB.VerifyCodeFixAsync(@"
528VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.IncreaseVisibilityRule).WithSpan(14, 9, 14, 12).WithArguments("Name", "name"),
552await VerifyVB.VerifyCodeFixAsync(@"
573VerifyVB.Diagnostic(DefineAccessorsForAttributeArgumentsAnalyzer.RemoveSetterRule).WithSpan(17, 9, 17, 12).WithArguments("Name", "name"),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotRaiseExceptionsInUnexpectedLocationsTests.cs (23)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
107await VerifyVB.VerifyAnalyzerAsync(code);
127await VerifyVB.VerifyAnalyzerAsync(code);
190await VerifyVB.VerifyAnalyzerAsync(code,
254await VerifyVB.VerifyAnalyzerAsync(code,
297await VerifyVB.VerifyAnalyzerAsync(code);
350await VerifyVB.VerifyAnalyzerAsync(code,
368await VerifyVB.VerifyAnalyzerAsync(code,
445await VerifyVB.VerifyAnalyzerAsync(code,
470await VerifyVB.VerifyAnalyzerAsync(code,
537await VerifyVB.VerifyAnalyzerAsync(code,
559await VerifyVB.VerifyAnalyzerAsync(code,
596await VerifyVB.VerifyAnalyzerAsync(code,
632await VerifyVB.VerifyAnalyzerAsync(code,
670await VerifyVB.VerifyAnalyzerAsync(code,
705await VerifyVB.VerifyAnalyzerAsync(code,
744return VerifyVB.VerifyAnalyzerAsync(code);
779return new VerifyVB.Test
830await VerifyVB.VerifyAnalyzerAsync(code,
889await VerifyVB.VerifyAnalyzerAsync(
936await VerifyVB.VerifyAnalyzerAsync(code,
974return VerifyVB.Diagnostic(DoNotRaiseExceptionsInUnexpectedLocationsAnalyzer.NoAllowedExceptionsRule)
988=> VerifyVB.Diagnostic(rule)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumsShouldHaveZeroValueTests.Fixer.cs (16)
10using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
282await new VerifyVB.Test
290VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleRename).WithLocation(0).WithArguments("E", "A"),
291VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleRename).WithLocation(1).WithArguments("E2", "A2"),
292VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleRename).WithLocation(2).WithArguments("E3", "A3"),
357await new VerifyVB.Test
365VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleRename).WithLocation(0).WithArguments("E", "A"),
366VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleRename).WithLocation(1).WithArguments("E2", "A2"),
367VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleRename).WithLocation(2).WithArguments("E3", "A3"),
415await VerifyVB.VerifyCodeFixAsync(
419VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleMultipleZero).WithSpan(4, 17, 4, 18).WithArguments("E"),
420VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleMultipleZero).WithSpan(11, 13, 11, 15).WithArguments("E2"),
421VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleMultipleZero).WithSpan(17, 13, 17, 15).WithArguments("E3"),
475await VerifyVB.VerifyCodeFixAsync(
479VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleNoZero).WithSpan(3, 17, 3, 18).WithArguments("E"),
480VerifyVB.Diagnostic(EnumsShouldHaveZeroValueAnalyzer.RuleNoZero).WithSpan(7, 17, 7, 19).WithArguments("E2"),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotContainUnderscoresTests.cs (57)
13using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
934await new VerifyVB.Test
955await new VerifyVB.Test
972await VerifyVB.VerifyCodeFixAsync(@"
984VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.NamespaceRule).WithLocation(0).WithArguments("OuterNamespace.HasUnderScore_"), @"
1001await VerifyVB.VerifyCodeFixAsync(@"
1009VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.TypeRule).WithLocation(0).WithArguments("OuterType.UnderScoreInName_"), @"
1022await VerifyVB.VerifyCodeFixAsync(@"
1038VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(0).WithArguments("DoesNotMatter.ConstField_"),
1039VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(1).WithArguments("DoesNotMatter.SharedReadOnlyField_"),
1040VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(2).WithArguments("DoesNotMatterEnum._EnumWithUnderscore")
1061await VerifyVB.VerifyCodeFixAsync(@"
1095VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(0).WithArguments("DoesNotMatter.PublicM1_()"),
1096VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(1).WithArguments("DoesNotMatter.ProtectedM4_()"),
1097VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(2).WithArguments("I1.M_()"),
1098VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(3).WithArguments("ImplementI1.M2_()")
1137await VerifyVB.VerifyCodeFixAsync(@"
1206VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(0).WithArguments("DoesNotMatter.PublicP1_"),
1207VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(1).WithArguments("DoesNotMatter.ProtectedP4_"),
1208VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(2).WithArguments("I1.P_"),
1209VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(3).WithArguments("ImplementI1.P2_")
1283await VerifyVB.VerifyCodeFixAsync(@"
1310VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(0).WithArguments("DoesNotMatter.PublicE1_"),
1311VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(1).WithArguments("DoesNotMatter.ProtectedE4_"),
1312VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(2).WithArguments("I1.E_"),
1313VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(3).WithArguments("ImplementI1.E2_"),
1345await VerifyVB.VerifyCodeFixAsync(@"
1352VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.DelegateParameterRule).WithLocation(0).WithArguments("Dele", "intPublic_"),
1353VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.DelegateParameterRule).WithLocation(1).WithArguments("Dele", "stringPublic_"),
1354VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.DelegateParameterRule).WithLocation(2).WithArguments("Del(Of T)", "t_")
1366await VerifyVB.VerifyCodeFixAsync(@"
1408VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberParameterRule).WithLocation(0).WithArguments("DoesNotMatter.PublicM1(Integer)", "int_"),
1409VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberParameterRule).WithLocation(1).WithArguments("DoesNotMatter.ProtectedM4(Integer)", "int_"),
1410VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberParameterRule).WithLocation(2).WithArguments("I.M(Integer)", "int_"),
1411VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberParameterRule).WithLocation(3).WithArguments("Base.M1(Integer)", "int_"),
1412VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberParameterRule).WithLocation(4).WithArguments("Base.M2(Integer)", "int_")
1459await VerifyVB.VerifyCodeFixAsync(@"
1465VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.TypeTypeParameterRule).WithLocation(0).WithArguments("DoesNotMatter(Of T_)", "T_"), @"
1476await VerifyVB.VerifyCodeFixAsync(@"
1517VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MethodTypeParameterRule).WithLocation(0).WithArguments("DoesNotMatter22.PublicM1(Of T1_)()", "T1_"),
1518VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MethodTypeParameterRule).WithLocation(1).WithArguments("DoesNotMatter22.ProtectedM4(Of D_)()", "D_"),
1519VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MethodTypeParameterRule).WithLocation(2).WithArguments("I.M(Of T_)()", "T_"),
1520VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MethodTypeParameterRule).WithLocation(3).WithArguments("Base.M1(Of T_)()", "T_"),
1521VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MethodTypeParameterRule).WithLocation(4).WithArguments("Base.M2(Of U_)()", "U_")
1567await VerifyVB.VerifyAnalyzerAsync(@"
1583await VerifyVB.VerifyAnalyzerAsync(@"
1608await VerifyVB.VerifyCodeFixAsync(@"
1676VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(0).WithArguments("InvalidContext.Application_AuthenticateRequest(Object, System.EventArgs)"),
1677VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(1).WithArguments("InvalidContext.Application_BeginRequest(Object, System.EventArgs)"),
1678VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(2).WithArguments("InvalidContext.Application_End(Object, System.EventArgs)"),
1679VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(3).WithArguments("InvalidContext.Application_EndRequest(Object, System.EventArgs)"),
1680VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(4).WithArguments("InvalidContext.Application_Error(Object, System.EventArgs)"),
1681VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(5).WithArguments("InvalidContext.Application_Init(Object, System.EventArgs)"),
1682VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(6).WithArguments("InvalidContext.Application_Start(Object, System.EventArgs)"),
1683VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(7).WithArguments("InvalidContext.Session_End(Object, System.EventArgs)"),
1684VerifyVB.Diagnostic(IdentifiersShouldNotContainUnderscoresAnalyzer.MemberRule).WithLocation(8).WithArguments("InvalidContext.Session_Start(Object, System.EventArgs)")
1767=> VerifyVB.Diagnostic(GetApproriateRule(symbolKind))
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\NestedTypesShouldNotBeVisibleTests.cs (20)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
42await VerifyVB.VerifyAnalyzerAsync(code, GetBasicCA1034ResultAt(3, 18, "Inner"));
68await VerifyVB.VerifyAnalyzerAsync(code, GetBasicCA1034ResultAt(3, 22, "Inner"));
96await VerifyVB.VerifyAnalyzerAsync(code);
108await VerifyVB.VerifyAnalyzerAsync(code, GetBasicCA1034ModuleResultAt(3, 18, "Inner"));
131await VerifyVB.VerifyAnalyzerAsync(code);
157await VerifyVB.VerifyAnalyzerAsync(code);
183await VerifyVB.VerifyAnalyzerAsync(code);
209await VerifyVB.VerifyAnalyzerAsync(code);
235await VerifyVB.VerifyAnalyzerAsync(code);
247await VerifyVB.VerifyAnalyzerAsync(code);
292await VerifyVB.VerifyAnalyzerAsync(code);
321await VerifyVB.VerifyAnalyzerAsync(code);
369await VerifyVB.VerifyAnalyzerAsync(code);
424await VerifyVB.VerifyAnalyzerAsync(code, GetBasicCA1034ResultAt(19, 18, "Inner"));
472await VerifyVB.VerifyAnalyzerAsync(code,
568await VerifyVB.VerifyAnalyzerAsync($@"
656await VerifyVB.VerifyAnalyzerAsync(@"
706=> VerifyVB.Diagnostic(NestedTypesShouldNotBeVisibleAnalyzer.DefaultRule)
713=> VerifyVB.Diagnostic(NestedTypesShouldNotBeVisibleAnalyzer.VisualBasicModuleRule)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorOverloadsHaveNamedAlternatesTests.Fixer.cs (17)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
250await VerifyVB.VerifyCodeFixAsync(@"
257VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.DefaultRule).WithSpan(3, 28, 3, 29).WithArguments("Add", "op_Addition"),
274await VerifyVB.VerifyCodeFixAsync(@"
281VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.MultipleRule).WithSpan(3, 28, 3, 31).WithArguments("Mod", "Remainder", "op_Modulus"),
298await VerifyVB.VerifyCodeFixAsync(@"
308VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.PropertyRule).WithSpan(3, 28, 3, 34).WithArguments("IsTrue", "op_True"),
330await VerifyVB.VerifyCodeFixAsync(@"
337VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.MultipleRule).WithSpan(3, 37, 3, 42).WithArguments("ToInt32", "FromC", "op_Implicit"),
354await VerifyVB.VerifyCodeFixAsync(@"
361VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.MultipleRule).WithSpan(3, 28, 3, 29).WithArguments("CompareTo", "Compare", "op_LessThan"),
382await VerifyVB.VerifyCodeFixAsync(@"
389VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.MultipleRule).WithSpan(3, 28, 3, 29).WithArguments("CompareTo", "Compare", "op_LessThan"),
406await new VerifyVB.Test
421VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.VisibilityRule).WithLocation(0).WithArguments("Add", "op_Addition"),
440await new VerifyVB.Test
460VerifyVB.Diagnostic(OperatorOverloadsHaveNamedAlternatesAnalyzer.VisibilityRule).WithLocation(0).WithArguments("IsTrue", "op_True"),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideEqualsAndOperatorEqualsOnValueTypesTests.Fixer.cs (10)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
202await VerifyVB.VerifyCodeFixAsync(@"
209VerifyVB.Diagnostic(OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer.EqualsRule).WithSpan(2, 18, 2, 19).WithArguments("A"),
210VerifyVB.Diagnostic(OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer.OpEqualityRule).WithSpan(2, 18, 2, 19).WithArguments("A"),
238await VerifyVB.VerifyCodeFixAsync(@"
249VerifyVB.Diagnostic(OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer.EqualsRule).WithSpan(2, 18, 2, 19).WithArguments("A"),
274await VerifyVB.VerifyCodeFixAsync(@"
289VerifyVB.Diagnostic(OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer.OpEqualityRule).WithSpan(2, 18, 2, 19).WithArguments("A"),
314await VerifyVB.VerifyCodeFixAsync(@"
329VerifyVB.Diagnostic(OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer.OpEqualityRule).WithSpan(2, 18, 2, 19).WithArguments("A"),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideMethodsOnComparableTypesTests.Fixer.cs (12)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
342await VerifyVB.VerifyCodeFixAsync(@"
353VerifyVB.Diagnostic(OverrideMethodsOnComparableTypesAnalyzer.RuleBoth).WithSpan(4, 14, 4, 15).WithArguments("A", "=, <>, <, <=, >, >="),
413await VerifyVB.VerifyCodeFixAsync(@"
424VerifyVB.Diagnostic(OverrideMethodsOnComparableTypesAnalyzer.RuleBoth).WithSpan(4, 18, 4, 19).WithArguments("A", "=, <>, <, <=, >, >="),
472await VerifyVB.VerifyCodeFixAsync(@"
491VerifyVB.Diagnostic(OverrideMethodsOnComparableTypesAnalyzer.RuleBoth).WithSpan(4, 14, 4, 15).WithArguments("A", "=, <>, <=, >, >="),
551await VerifyVB.VerifyCodeFixAsync(@"
570VerifyVB.Diagnostic(OverrideMethodsOnComparableTypesAnalyzer.RuleBoth).WithSpan(4, 18, 4, 19).WithArguments("A", "=, <>, <=, >, >="),
759await VerifyVB.VerifyCodeFixAsync(@"
779VerifyVB.Diagnostic(OverrideMethodsOnComparableTypesAnalyzer.RuleBoth).WithSpan(4, 14, 4, 23).WithArguments("SomeClass", "=, <>, <, <=, >, >="),
780VerifyVB.Diagnostic(OverrideMethodsOnComparableTypesAnalyzer.RuleBoth).WithSpan(12, 18, 12, 32).WithArguments("SomeOtherClass", "=, <>, <, <=, >, >="),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertiesShouldNotBeWriteOnlyTests.cs (24)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
273await VerifyVB.VerifyAnalyzerAsync(code);
295await VerifyVB.VerifyAnalyzerAsync(code);
317await VerifyVB.VerifyAnalyzerAsync(code);
339await VerifyVB.VerifyAnalyzerAsync(code);
361await VerifyVB.VerifyAnalyzerAsync(code);
383await VerifyVB.VerifyAnalyzerAsync(code);
405await VerifyVB.VerifyAnalyzerAsync(code);
427await VerifyVB.VerifyAnalyzerAsync(code);
640await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 35, CA1044MessageAddGetter, "VB_WriteOnlyProperty"));
659await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 38, CA1044MessageAddGetter, "VB_WriteOnlyProperty1"));
678await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 35, CA1044MessageAddGetter, "VB_WriteOnlyProperty2"));
697await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 45, CA1044MessageAddGetter, "VB_WriteOnlyProperty3"));
716await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 35, CA1044MessageAddGetter, "VB_WriteOnlyProperty4"));
735await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 35, CA1044MessageAddGetter, "VB_WriteOnlyProperty5"));
755await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(5, 28, CA1044MessageAddGetter, "InterfaceProperty"));
769await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(5, 28, CA1044MessageAddGetter, "VB_InterfaceProperty1"));
790await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(5, 28, CA1044MessageAddGetter, "InterfaceProperty"));
806await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(5, 47, CA1044MessageAddGetter, "VB_BaseProperty"));
829await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 25, CA1044MessageMakeMoreAccessible, "VB_InaccessibleProperty"));
851await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 28, CA1044MessageMakeMoreAccessible, "VB_InaccessibleProperty1"));
873await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 35, CA1044MessageMakeMoreAccessible, "VB_InaccessibleProperty2"));
895await VerifyVB.VerifyAnalyzerAsync(code, GetCA1044BasicResultAt(6, 25, CA1044MessageMakeMoreAccessible, "VB_InaccessibleProperty3"));
912=> VerifyVB.Diagnostic(CA1044Message == CA1044MessageAddGetter
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypesThatOwnDisposableFieldsShouldBeDisposableTests.cs (22)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
404await VerifyVB.VerifyAnalyzerAsync(@"
418await VerifyVB.VerifyAnalyzerAsync(@"
430await VerifyVB.VerifyCodeFixAsync(@"
452await VerifyVB.VerifyCodeFixAsync(@"
474await VerifyVB.VerifyCodeFixAsync(@"
502await VerifyVB.VerifyCodeFixAsync(@"
540await VerifyVB.VerifyAnalyzerAsync(@"
555await VerifyVB.VerifyAnalyzerAsync(@"
570await VerifyVB.VerifyCodeFixAsync(@"
606await VerifyVB.VerifyCodeFixAsync(@"
648await VerifyVB.VerifyAnalyzerAsync(@"
688await VerifyVB.VerifyCodeFixAsync(@"
754await VerifyVB.VerifyCodeFixAsync(@"
767VerifyVB.Diagnostic().WithLocation(0).WithArguments("NoDisposeClass", "_fs1"), @"
829await VerifyVB.VerifyCodeFixAsync(@"
843VerifyVB.Diagnostic().WithLocation(0).WithArguments("NoDisposeClass", "_fs1', '_fs2', '_fs3', '_fs4"), @"
914await new VerifyVB.Test
934ExpectedDiagnostics = { VerifyVB.Diagnostic().WithLocation(0).WithArguments("SomeClass", args), },
996await VerifyVB.VerifyCodeFixAsync(@"
1106await VerifyVB.VerifyCodeFixAsync(@"
1139await VerifyVB.VerifyCodeFixAsync(@"
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidLengthCalculationWhenSlicingToEndTests.cs (29)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
916await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
942await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
972await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1002await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1032await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1060await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1086await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1116await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1146await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1171await VerifyVB.VerifyCodeFixAsync(source, source);
1194await VerifyVB.VerifyCodeFixAsync(source, source);
1220await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1266await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1293await VerifyVB.VerifyCodeFixAsync(source, source);
1310await VerifyVB.VerifyCodeFixAsync(source, source);
1330await VerifyVB.VerifyCodeFixAsync(source, source);
1350await VerifyVB.VerifyCodeFixAsync(source, source);
1370await VerifyVB.VerifyCodeFixAsync(source, source);
1387await VerifyVB.VerifyCodeFixAsync(source, source);
1407await VerifyVB.VerifyCodeFixAsync(source, source);
1424await VerifyVB.VerifyCodeFixAsync(source, source);
1450await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1476await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1502await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1526await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1550await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1578await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1600await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\MarkMembersAsStaticTests.cs (30)
14using VerifyVB = VisualBasicCodeFixVerifier<MarkMembersAsStaticAnalyzer, BasicMarkMembersAsStaticFixer>;
75await VerifyVB.VerifyAnalyzerAsync(@"
128VerifyVB.Diagnostic().WithLocation(0).WithArguments("Method1"),
129VerifyVB.Diagnostic().WithLocation(1).WithArguments("Method2"),
130VerifyVB.Diagnostic().WithLocation(2).WithArguments("Method3"),
131VerifyVB.Diagnostic().WithLocation(3).WithArguments("Method4"),
132VerifyVB.Diagnostic().WithLocation(4).WithArguments("Property1"),
133VerifyVB.Diagnostic().WithLocation(5).WithArguments("Property2"),
134VerifyVB.Diagnostic().WithLocation(6).WithArguments("MyProperty"),
135VerifyVB.Diagnostic().WithLocation(7).WithArguments("CustomEvent"));
215await VerifyVB.VerifyAnalyzerAsync(@"
289VerifyVB.Diagnostic().WithLocation(0).WithArguments("Method1"),
290VerifyVB.Diagnostic().WithLocation(1).WithArguments("Method3"),
291VerifyVB.Diagnostic().WithLocation(2).WithArguments("Method4"),
292VerifyVB.Diagnostic().WithLocation(3).WithArguments("Property1"),
293VerifyVB.Diagnostic().WithLocation(4).WithArguments("Property2"),
294VerifyVB.Diagnostic().WithLocation(5).WithArguments("MyProperty"),
295VerifyVB.Diagnostic().WithLocation(6).WithArguments("CustomEvent"));
355await VerifyVB.VerifyAnalyzerAsync(@"
445await VerifyVB.VerifyAnalyzerAsync(@"
494await VerifyVB.VerifyAnalyzerAsync(@"
569await new VerifyVB.Test
643await new VerifyVB.Test
766await VerifyVB.VerifyAnalyzerAsync(@"
778VerifyVB.Diagnostic().WithLocation(0).WithArguments("M"));
991await new VerifyVB.Test()
1020await VerifyVB.VerifyAnalyzerAsync(@"
1114await VerifyVB.VerifyAnalyzerAsync(@"
1267await new VerifyVB.Test()
1451await VerifyVB.VerifyAnalyzerAsync(@"
Microsoft.CodeQuality.Analyzers\QualityGuidelines\UseLiteralsWhereAppropriateTests.Fixer.cs (10)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
34await VerifyVB.VerifyCodeFixAsync(@"
39VerifyVB.Diagnostic(UseLiteralsWhereAppropriateAnalyzer.EmptyStringRule).WithSpan(3, 28, 3, 30).WithArguments("f1"),
66await VerifyVB.VerifyCodeFixAsync(@"
72VerifyVB.Diagnostic(UseLiteralsWhereAppropriateAnalyzer.DefaultRule).WithSpan(4, 21, 4, 23).WithArguments("f1"),
101await VerifyVB.VerifyCodeFixAsync(@"
106VerifyVB.Diagnostic(UseLiteralsWhereAppropriateAnalyzer.DefaultRule).WithSpan(3, 35, 3, 37).WithArguments("f4"),
133await VerifyVB.VerifyCodeFixAsync(@"
139VerifyVB.Diagnostic(UseLiteralsWhereAppropriateAnalyzer.DefaultRule).WithSpan(4, 28, 4, 30).WithArguments("f7"),
170await VerifyVB.VerifyCodeFixAsync(vbCode, vbCode);
Microsoft.NetCore.Analyzers\Performance\DoNotGuardDictionaryRemoveByContainsKeyTests.cs (36)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
1184await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1216await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1248await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1282await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1312await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1344await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1374await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1406await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1442await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1480await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1516await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1554await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1572await VerifyVB.VerifyAnalyzerAsync(source);
1590await VerifyVB.VerifyAnalyzerAsync(source);
1608await VerifyVB.VerifyAnalyzerAsync(source);
1627await VerifyVB.VerifyAnalyzerAsync(source);
1647await VerifyVB.VerifyCodeFixAsync(source, source);
1668await VerifyVB.VerifyCodeFixAsync(source, source);
1690await VerifyVB.VerifyCodeFixAsync(source, source);
1713await VerifyVB.VerifyCodeFixAsync(source, source);
1734await VerifyVB.VerifyCodeFixAsync(source, source);
1756await VerifyVB.VerifyCodeFixAsync(source, source);
1779await VerifyVB.VerifyCodeFixAsync(source, source);
1803await VerifyVB.VerifyCodeFixAsync(source, source);
1821await VerifyVB.VerifyCodeFixAsync(source, source);
1839await VerifyVB.VerifyCodeFixAsync(source, source);
1858await VerifyVB.VerifyCodeFixAsync(source, source);
1877await VerifyVB.VerifyCodeFixAsync(source, source);
1895await VerifyVB.VerifyCodeFixAsync(source, source);
1913await VerifyVB.VerifyCodeFixAsync(source, source);
1931await VerifyVB.VerifyCodeFixAsync(source, source);
1949await VerifyVB.VerifyCodeFixAsync(source, source);
1967await VerifyVB.VerifyCodeFixAsync(source, source);
1985await VerifyVB.VerifyCodeFixAsync(source, source);
2019await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
Microsoft.NetCore.Analyzers\Performance\DoNotGuardSetAddOrRemoveByContainsTests.cs (36)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
1184await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1214await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1246await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1278await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1308await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1338await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1368await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1398await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1434await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1470await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1506await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1542await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1560await VerifyVB.VerifyAnalyzerAsync(source);
1578await VerifyVB.VerifyAnalyzerAsync(source);
1596await VerifyVB.VerifyAnalyzerAsync(source);
1614await VerifyVB.VerifyAnalyzerAsync(source);
1634await VerifyVB.VerifyCodeFixAsync(source, source);
1654await VerifyVB.VerifyCodeFixAsync(source, source);
1676await VerifyVB.VerifyCodeFixAsync(source, source);
1698await VerifyVB.VerifyCodeFixAsync(source, source);
1719await VerifyVB.VerifyCodeFixAsync(source, source);
1740await VerifyVB.VerifyCodeFixAsync(source, source);
1763await VerifyVB.VerifyCodeFixAsync(source, source);
1786await VerifyVB.VerifyCodeFixAsync(source, source);
1804await VerifyVB.VerifyCodeFixAsync(source, source);
1822await VerifyVB.VerifyCodeFixAsync(source, source);
1840await VerifyVB.VerifyCodeFixAsync(source, source);
1858await VerifyVB.VerifyCodeFixAsync(source, source);
1876await VerifyVB.VerifyCodeFixAsync(source, source);
1894await VerifyVB.VerifyCodeFixAsync(source, source);
1912await VerifyVB.VerifyCodeFixAsync(source, source);
1930await VerifyVB.VerifyCodeFixAsync(source, source);
1948await VerifyVB.VerifyCodeFixAsync(source, source);
1966await VerifyVB.VerifyCodeFixAsync(source, source);
2000await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
Microsoft.NetCore.Analyzers\Performance\PreferCountOverAnyTests.cs (11)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
71return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
122return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
173return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
205return VerifyVB.VerifyAnalyzerAsync(code);
237return VerifyVB.VerifyAnalyzerAsync(code);
270return VerifyVB.VerifyAnalyzerAsync(code);
321return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
372return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
398return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
424return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
Microsoft.NetCore.Analyzers\Performance\PreferIsEmptyOverAnyTests.cs (11)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
69return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
119return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
169return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
201return VerifyVB.VerifyAnalyzerAsync(code);
233return VerifyVB.VerifyAnalyzerAsync(code);
283return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
333return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
358return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
383return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
445return VerifyVB.VerifyCodeFixAsync(code, ExpectedDiagnostic, fixedCode);
Microsoft.NetCore.Analyzers\Performance\PreferIsEmptyOverCountTests.cs (14)
15using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
145await VerifyVB.VerifyCodeFixAsync(
147VerifyVB.Diagnostic(UseCountProperlyAnalyzer.s_rule_CA1836).WithSpan(14, 40, 14, 55),
178return VerifyVB.VerifyCodeFixAsync(
180VerifyVB.Diagnostic(UseCountProperlyAnalyzer.s_rule_CA1836).WithSpan(6, 20, 6, 20 + condition.Length),
236=> VerifyVB.VerifyCodeFixAsync(
239VerifyVB.Diagnostic(UseCountProperlyAnalyzer.s_rule_CA1836).WithLocation(6, 20),
255=> VerifyVB.VerifyCodeFixAsync(
268VerifyVB.Diagnostic(UseCountProperlyAnalyzer.s_rule_CA1836).WithLocation(9, 18),
303=> VerifyVB.VerifyAnalyzerAsync(
352=> VerifyVB.VerifyAnalyzerAsync(
375VerifyVB.Diagnostic(UseCountProperlyAnalyzer.s_rule_CA1827).WithLocation(9, 20).WithArguments("Count"));
399=> VerifyVB.VerifyCodeFixAsync(
409VerifyVB.Diagnostic(UseCountProperlyAnalyzer.s_rule_CA1836).WithLocation(5, 20),
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocationsTests.cs (17)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
226await VerifyVB.VerifyCodeFixAsync(
231VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(7, 33).WithArguments("Array.Empty(Of Integer)()"),
234VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(8, 30).WithArguments("Array.Empty(Of Byte)()"),
237VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(9, 27).WithArguments("Array.Empty(Of C)()"),
240VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(13, 35).WithArguments("Array.Empty(Of Integer())()"),
243VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(14, 39).WithArguments("Array.Empty(Of Integer()()())()"),
246VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(16, 37).WithArguments("Array.Empty(Of Integer(,))()"),
251await VerifyVB.VerifyCodeFixAsync(
256VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(7 + 1, 33).WithArguments("Array.Empty(Of Integer)()"),
259VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(8 + 1, 30).WithArguments("Array.Empty(Of Byte)()"),
262VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(9 + 1, 27).WithArguments("Array.Empty(Of C)()"),
265VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(13 + 1, 35).WithArguments("Array.Empty(Of Integer())()"),
268VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(14 + 1, 39).WithArguments("Array.Empty(Of Integer()()())()"),
271VerifyVB.Diagnostic(AvoidZeroLengthArrayAllocationsAnalyzer.UseArrayEmptyDescriptor).WithLocation(16 + 1, 37).WithArguments("Array.Empty(Of Integer(,))()"),
348await VerifyVB.VerifyAnalyzerAsync(source + arrayEmptySource);
764await VerifyVB.VerifyCodeFixAsync(source, source);
Microsoft.NetCore.Analyzers\Runtime\CallGCSuppressFinalizeCorrectlyTests.cs (21)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
31VerifyVB.Diagnostic(rule)
81await VerifyVB.VerifyAnalyzerAsync(code);
140await VerifyVB.VerifyAnalyzerAsync(code);
228await VerifyVB.VerifyAnalyzerAsync(code);
287await VerifyVB.VerifyAnalyzerAsync(code);
333await VerifyVB.VerifyAnalyzerAsync(code);
386await VerifyVB.VerifyAnalyzerAsync(code);
430await VerifyVB.VerifyAnalyzerAsync(code);
474await VerifyVB.VerifyAnalyzerAsync(code);
511await VerifyVB.VerifyAnalyzerAsync(code);
548await VerifyVB.VerifyAnalyzerAsync(vbCode);
635await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
709await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
783await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
864await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
925await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
979await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
1026await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
1146await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult1, diagnosticResult2, diagnosticResult3, diagnosticResult4);
1216await VerifyVB.VerifyAnalyzerAsync(code, diagnosticResult);
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureTests.Fields.cs (7)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
134testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.FieldOrEventIsPreviewTypeRule).WithLocation(0).WithArguments("_field", "PreviewType", DetectPreviewFeatureAnalyzer.DefaultURL));
135testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.FieldOrEventIsPreviewTypeRule).WithLocation(2).WithArguments("_genericPreviewField", "PreviewType", DetectPreviewFeatureAnalyzer.DefaultURL));
272vbTest.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.FieldOrEventIsPreviewTypeRule).WithLocation(0).WithArguments("_field", "PreviewType", DetectPreviewFeatureAnalyzer.DefaultURL));
273vbTest.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.GeneralPreviewFeatureAttributeRule).WithLocation(1).WithArguments("PreviewType", DetectPreviewFeatureAnalyzer.DefaultURL));
274vbTest.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.FieldOrEventIsPreviewTypeRule).WithLocation(2).WithArguments("_genericPreviewField", "PreviewType", DetectPreviewFeatureAnalyzer.DefaultURL));
275vbTest.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.FieldOrEventIsPreviewTypeRule).WithLocation(3).WithArguments("_genericPreviewField", "AGenericClass", DetectPreviewFeatureAnalyzer.DefaultURL));
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureTests.Interfaces.cs (8)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
73testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewMethodRule).WithLocation(0).WithArguments("MarkedMethodInInterface", "IProgram.MarkedMethodInInterface", DetectPreviewFeatureAnalyzer.DefaultURL));
138testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewMethodRule).WithLocation(0).WithArguments("MarkedMethodInInterface", "IProgram.MarkedMethodInInterface", DetectPreviewFeatureAnalyzer.DefaultURL));
139testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewInterfaceRule).WithLocation(1).WithArguments("Program", "IProgram", DetectPreviewFeatureAnalyzer.DefaultURL));
140testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewMethodRule).WithLocation(2).WithArguments("Value", "IProgram.Value", DetectPreviewFeatureAnalyzer.DefaultURL));
141testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewMethodRule).WithLocation(3).WithArguments("get_Value", "IProgram.get_Value", DetectPreviewFeatureAnalyzer.DefaultURL));
190testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewInterfaceRule).WithLocation(1).WithArguments("Program", "IProgram", DetectPreviewFeatureAnalyzer.DefaultURL));
233testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewInterfaceRule).WithLocation(0).WithArguments("IZoo", "IFoo", DetectPreviewFeatureAnalyzer.DefaultURL));
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureTests.Methods.cs (10)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
84testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.UsesPreviewTypeParameterRule).WithLocation(0).WithArguments("Getter", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
85testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodReturnsPreviewTypeRule).WithLocation(1).WithArguments("Getter", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
142testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.UsesPreviewTypeParameterRule).WithLocation(0).WithArguments("Getter", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
143testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodReturnsPreviewTypeRule).WithLocation(1).WithArguments("Getter", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
271testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodUsesPreviewTypeAsParameterRuleWithCustomMessage).WithLocation(0).WithArguments("Getter", "Foo", "https://aka.ms/aspnet/kestrel/http3reqs", "Lib is in preview."));
272testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.GeneralPreviewFeatureAttributeRuleWithCustomMessage).WithLocation(1).WithArguments("Foo", "https://aka.ms/aspnet/kestrel/http3reqs", "Lib is in preview."));
273testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodReturnsPreviewTypeRuleWithCustomMessage).WithLocation(2).WithArguments("Getter", "Foo", "https://aka.ms/aspnet/kestrel/http3reqs", "Lib is in preview."));
338testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodUsesPreviewTypeAsParameterRule).WithLocation(0).WithArguments("Getter", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
339testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodReturnsPreviewTypeRule).WithLocation(2).WithArguments("Getter", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureTests.Properties.cs (7)
8using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
119testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodReturnsPreviewTypeRule).WithLocation(0).WithArguments("get_Value", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
120testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.MethodUsesPreviewTypeAsParameterRule).WithLocation(1).WithArguments("set_Value", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
121testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.UsesPreviewTypeParameterRule).WithLocation(2).WithArguments("AFoo", "Foo", DetectPreviewFeatureAnalyzer.DefaultURL));
122testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.GeneralPreviewFeatureAttributeRule).WithLocation(4).WithArguments("_value", DetectPreviewFeatureAnalyzer.DefaultURL));
123testVb.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.GeneralPreviewFeatureAttributeRule).WithLocation(5).WithArguments("_value", DetectPreviewFeatureAnalyzer.DefaultURL));
427vbTest.ExpectedDiagnostics.Add(VerifyVB.Diagnostic(DetectPreviewFeatureAnalyzer.ImplementsPreviewInterfaceRule).WithLocation(0).WithArguments("Foo", "IFoo", DetectPreviewFeatureAnalyzer.DefaultURL));
Microsoft.NetCore.Analyzers\Runtime\DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzerTests.cs (10)
16using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
997await VerifyVB.VerifyAnalyzerAsync(@"
1058VerifyVB.Diagnostic(castRule).WithLocation(11).WithArguments("Integer", "String"),
1059VerifyVB.Diagnostic(castRule).WithLocation(12).WithArguments("String", "Integer"),
1061VerifyVB.Diagnostic(castRule).WithLocation(15).WithArguments("Fruit", "Salad"),
1063VerifyVB.Diagnostic(castRule).WithLocation(21).WithArguments("Orange", "Apple"),
1064VerifyVB.Diagnostic(castRule).WithLocation(22).WithArguments("Orange", "Salad"),
1066VerifyVB.Diagnostic(castRule).WithLocation(30).WithArguments("IApple", "Salad"),
1068VerifyVB.Diagnostic(castRule).WithLocation(40).WithArguments("Apple", "Orange"),
1069VerifyVB.Diagnostic(castRule).WithLocation(41).WithArguments("Apple", "Salad")
Microsoft.NetCore.Analyzers\Runtime\ForwardCancellationTokenToInvocationsTests.cs (66)
10using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
2539return VerifyVB.VerifyAnalyzerAsync(@"
2556return VerifyVB.VerifyAnalyzerAsync(@"
2570return VerifyVB.VerifyAnalyzerAsync(@"
2587return VerifyVB.VerifyAnalyzerAsync(@"
2604return VerifyVB.VerifyAnalyzerAsync(@"
2624return VerifyVB.VerifyAnalyzerAsync(@"
2644return VerifyVB.VerifyAnalyzerAsync(@"
2659return VerifyVB.VerifyAnalyzerAsync(@"
2682return VerifyVB.VerifyAnalyzerAsync(@"
2702return VerifyVB.VerifyAnalyzerAsync(@"
2722return VerifyVB.VerifyAnalyzerAsync(@"
2742return VerifyVB.VerifyAnalyzerAsync(@"
2762return VerifyVB.VerifyAnalyzerAsync(@"
2782return VerifyVB.VerifyAnalyzerAsync(@"
2799return VerifyVB.VerifyAnalyzerAsync(@"
2900return VerifyVB.VerifyAnalyzerAsync(originalCode);
2909return VerifyVB.VerifyAnalyzerAsync(@"
2937return VerifyVB.VerifyAnalyzerAsync(@"
2985return VerifyVB.VerifyAnalyzerAsync(originalCode);
3045return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3075return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3105return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3137return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3167return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3197return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3231return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3273return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3307return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3349return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3379return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3409return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3445return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3481return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3517return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3553return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3601return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3649return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3689return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3729return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3769return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3815return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3861return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3901return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3947return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
3991return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4023return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4061return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4093return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4131return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4161return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4191return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4221return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4253return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4285return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4314return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4352return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4483return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4525return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4562return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4595return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4641return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4687return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4734return VerifyVB.VerifyCodeFixAsync(originalCode, fixedCode);
4770var test = new VerifyVB.Test
4784var test = new VerifyVB.Test
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectlyTests.cs (17)
9using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
42await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
70await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
98await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
126await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
154await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
182await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
210await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
238await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
266await VerifyVB.VerifyAnalyzerAsync(code);
303await VerifyVB.VerifyAnalyzerAsync(code);
331await VerifyVB.VerifyAnalyzerAsync(code);
359await VerifyVB.VerifyAnalyzerAsync(code);
387await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(4, 16));
431await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(6, 11));
464await VerifyVB.VerifyAnalyzerAsync(code, GetBasicResultAt(6, 19));
615=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\UseAsyncMethodInAsyncContextTests.cs (26)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
51await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads Sub Wait()"));
84await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Shared Overloads Sub Sleep(millisecondsTimeout As Integer)"));
117await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads Sub Wait()"));
163var vbTestVerify = new VerifyVB.Test
166ExpectedDiagnostics = { VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads Sub Wait()") },
203await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
246await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
284await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
322await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
353await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
384await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
422await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads ReadOnly Property Result As TResult"));
489await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads Sub GetResult()"));
526await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo(x As Integer, y As Integer)", "Friend Function FooAsync(x As Integer, y As Integer) As Task"));
622await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo(x As Integer, y As Double)", "Friend Function FooAsync(x As Integer, y As Double) As Task"));
662await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Function Foo() As Integer", "Friend Function FooAsync() As Task(Of Integer)"));
705await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo()", "Friend Function FooAsync() As Task"));
799await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo()", "Friend Function FooAsync() As Task"));
851await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo()", "Friend Function FooAsync() As Task"));
896await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo()", "Friend Function FooAsync() As Task"));
1068await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo(Of Integer)()", "Friend Function FooAsync() As Task"));
1116await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.Descriptor).WithLocation(0).WithArguments("Friend Sub Foo()", "Friend Function FooAsync() As Task"));
1164await CreateVBTestAndRunAsync(testVB, VerifyVB.Diagnostic(UseAsyncMethodInAsyncContext.DescriptorNoAlternativeMethod).WithLocation(0).WithArguments("Public Overloads Sub Wait()"));
1581var csTestVerify = new VerifyVB.Test
1591var csTestVerify = new VerifyVB.Test
Microsoft.NetCore.Analyzers\Usage\PreferGenericOverloadsTests.cs (40)
10using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
1449await VerifyVB.VerifyCodeFixAsync(source, source);
1466await VerifyVB.VerifyCodeFixAsync(source, source);
1485await VerifyVB.VerifyCodeFixAsync(source, source);
1505await VerifyVB.VerifyCodeFixAsync(source, source);
1523await VerifyVB.VerifyCodeFixAsync(source, source);
1541await VerifyVB.VerifyCodeFixAsync(source, source);
1558await VerifyVB.VerifyCodeFixAsync(source, source);
1575await VerifyVB.VerifyCodeFixAsync(source, source);
1593await VerifyVB.VerifyCodeFixAsync(source, source);
1612await VerifyVB.VerifyCodeFixAsync(source, source);
1644await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1663await VerifyVB.VerifyCodeFixAsync(source, source);
1695await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1716await VerifyVB.VerifyCodeFixAsync(source, source);
1752await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1771await VerifyVB.VerifyCodeFixAsync(source, source);
1807await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1835await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1869await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1897await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1931await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1959await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
1993await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2021await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2055await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2083await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2123await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2163await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2195await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2223await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2251await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2287await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2301await VerifyVB.VerifyCodeFixAsync(source, source);
2323await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2365await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2407await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2435await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2465await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
2505await VerifyVB.VerifyCodeFixAsync(source, fixedSource);
Microsoft.NetFramework.Analyzers\TypesShouldNotExtendCertainBaseTypesTests.cs (16)
11using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
176await VerifyVB.VerifyAnalyzerAsync(@"
203await VerifyVB.VerifyAnalyzerAsync(source, expected);
219await VerifyVB.VerifyAnalyzerAsync(source);
238await VerifyVB.VerifyAnalyzerAsync(source, expected);
253await VerifyVB.VerifyAnalyzerAsync(source);
302await VerifyVB.VerifyAnalyzerAsync(source, expected);
342await VerifyVB.VerifyAnalyzerAsync(source);
357return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
373return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
389return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
405return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
421return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
437return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
453return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
469return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);