Skip to content

Fix RazorPredefinedProviderNameTests #58263

@RikkiGibson

Description

@RikkiGibson

Unfortunately, this assembly was never actually running in CI, and the tests are now failing. See https://dev.azure.com/dnceng/public/_build/results?buildId=1507468&view=ms.vss-test-web.build-test-results-tab&runId=42941976&resultId=157376&paneView=debug

[xUnit.net 00:00:01.16]     Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests.RazorPredefinedProviderNameTests.RoslynNamesExistAndValuesMatchInRazorNamesClass(roslynProviderNamesType: typeof(Microsoft.CodeAnalysis.CodeRefactorings.PredefinedCodeRefactoringProviderNames), razorProviderNamesType: typeof(Microsoft.CodeAnalysis.ExternalAccess.Razor.RazorPredefinedCodeRefactoringProviderNames)) [FAIL]
[xUnit.net 00:00:01.22]     Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests.RazorPredefinedProviderNameTests.RoslynNamesExistAndValuesMatchInRazorNamesClass(roslynProviderNamesType: typeof(Microsoft.CodeAnalysis.CodeFixes.PredefinedCodeFixProviderNames), razorProviderNamesType: typeof(Microsoft.CodeAnalysis.ExternalAccess.Razor.RazorPredefinedCodeFixProviderNames)) [FAIL]
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.
  Failed Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests.RazorPredefinedProviderNameTests.RoslynNamesExistAndValuesMatchInRazorNamesClass(roslynProviderNamesType: typeof(Microsoft.CodeAnalysis.CodeRefactorings.PredefinedCodeRefactoringProviderNames), razorProviderNamesType: typeof(Microsoft.CodeAnalysis.ExternalAccess.Razor.RazorPredefinedCodeRefactoringProviderNames)) [38 ms]
  Error Message:
   The following Names were inconsistent between PredefinedCodeRefactoringProviderNames and RazorPredefinedCodeRefactoringProviderNames:
The Name 'EnableNullable' does not exist.
The Value of 'EnableNullable' does not match.
The Name 'ConvertAnonymousTypeToTuple' does not exist.
The Value of 'ConvertAnonymousTypeToTuple' does not match.
The Name 'IntroduceParameter' does not exist.
The Value of 'IntroduceParameter' does not match.
The Name 'MoveStaticMembers' does not exist.
The Value of 'MoveStaticMembers' does not match.
The Name 'UseRecursivePatterns' does not exist.
The Value of 'UseRecursivePatterns' does not match.
The Name 'ConvertNamespace' does not exist.
The Value of 'ConvertNamespace' does not match.

Expected: True
Actual:   False
  Stack Trace:
     at Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests.RazorPredefinedProviderNameTests.RoslynNamesExistAndValuesMatchInRazorNamesClass(Type roslynProviderNamesType, Type razorProviderNamesType) in /_/src/Tools/ExternalAccess/RazorTest/RazorPredefinedProviderNameTests.cs:line 46
  Failed Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests.RazorPredefinedProviderNameTests.RoslynNamesExistAndValuesMatchInRazorNamesClass(roslynProviderNamesType: typeof(Microsoft.CodeAnalysis.CodeFixes.PredefinedCodeFixProviderNames), razorProviderNamesType: typeof(Microsoft.CodeAnalysis.ExternalAccess.Razor.RazorPredefinedCodeFixProviderNames)) [5 ms]
  Error Message:
   The following Names were inconsistent between PredefinedCodeFixProviderNames and RazorPredefinedCodeFixProviderNames:
The Name 'GenerateDefaultConstructors' does not exist.
The Value of 'GenerateDefaultConstructors' does not match.
The Name 'AddInheritdoc' does not exist.
The Value of 'AddInheritdoc' does not match.
The Name 'SimplifyObjectCreation' does not exist.
The Value of 'SimplifyObjectCreation' does not match.
The Name 'SimplifyPropertyPattern' does not exist.
The Value of 'SimplifyPropertyPattern' does not match.
The Name 'UseTupleSwap' does not exist.
The Value of 'UseTupleSwap' does not match.
The Name 'ConvertNamespace' does not exist.
The Value of 'ConvertNamespace' does not match.
The Name 'UseNullCheckOverTypeCheck' does not exist.
The Value of 'UseNullCheckOverTypeCheck' does not match.

Expected: True
Actual:   False
  Stack Trace:
     at Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests.RazorPredefinedProviderNameTests.RoslynNamesExistAndValuesMatchInRazorNamesClass(Type roslynProviderNamesType, Type razorProviderNamesType) in /_/src/Tools/ExternalAccess/RazorTest/RazorPredefinedProviderNameTests.cs:line 46

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions