зеркало из https://github.com/dotnet/razor.git
Update test framework for .NET 6 stuff
This commit is contained in:
Родитель
4cf2007189
Коммит
da8752a314
|
@ -17,6 +17,7 @@ using Microsoft.AspNetCore.Razor.LanguageServer.Test;
|
|||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.ExternalAccess.Razor;
|
||||
using Microsoft.CodeAnalysis.Options;
|
||||
using Microsoft.CodeAnalysis.Razor;
|
||||
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
|
||||
using Microsoft.CodeAnalysis.Razor.Serialization;
|
||||
using Microsoft.CodeAnalysis.Razor.Workspaces.Extensions;
|
||||
|
@ -255,11 +256,12 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting
|
|||
var projectEngine = RazorProjectEngine.Create(builder =>
|
||||
{
|
||||
builder.SetRootNamespace("Test");
|
||||
builder.Features.Add(new DefaultTypeNameFeature());
|
||||
RazorExtensions.Register(builder);
|
||||
});
|
||||
var codeDocument = projectEngine.ProcessDesignTime(sourceDocument, fileKind, new[] { importsDocument }, tagHelpers);
|
||||
|
||||
Assert.False(codeDocument.GetCSharpDocument().Diagnostics.Any(), "Error creating document: " + string.Join(Environment.NewLine, codeDocument.GetCSharpDocument().Diagnostics));
|
||||
Assert.False(codeDocument.GetCSharpDocument().Diagnostics.Any(), "Error creating document:" + Environment.NewLine + string.Join(Environment.NewLine, codeDocument.GetCSharpDocument().Diagnostics));
|
||||
|
||||
var documentSnapshot = new Mock<DocumentSnapshot>(MockBehavior.Strict);
|
||||
documentSnapshot.Setup(d => d.GetGeneratedOutputAsync()).Returns(Task.FromResult(codeDocument));
|
||||
|
|
|
@ -129,6 +129,8 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
b.Phases.Insert(0, new ForceLineEndingPhase(LineEnding));
|
||||
}
|
||||
|
||||
b.Features.Add(new DefaultTypeNameFeature());
|
||||
|
||||
b.Features.Add(new CompilationTagHelperFeature());
|
||||
b.Features.Add(new DefaultMetadataReferenceFeature()
|
||||
{
|
||||
|
|
|
@ -59,6 +59,12 @@ namespace Microsoft.AspNetCore.Components
|
|||
public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
}
|
||||
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
public sealed class CascadingTypeParameterAttribute : System.Attribute
|
||||
{
|
||||
public CascadingTypeParameterAttribute(string name) { }
|
||||
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
}
|
||||
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
|
||||
public sealed partial class CascadingParameterAttribute : System.Attribute
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче