// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Host; using Microsoft.CodeAnalysis.Text; using Xunit; namespace Microsoft.CodeAnalysis.Razor.ProjectSystem { public class DefaultDocumentSnapshotTest : WorkspaceTestBase { public DefaultDocumentSnapshotTest() { var projectState = ProjectState.Create(Workspace.Services, TestProjectData.SomeProject); var project = new DefaultProjectSnapshot(projectState); HostDocument = TestProjectData.SomeProjectFile1; SourceText = SourceText.From("
Hello World
"); Version = VersionStamp.Default.GetNewerVersion(); var textAndVersion = TextAndVersion.Create(SourceText, Version); var documentState = DocumentState.Create(Workspace.Services, HostDocument, () => Task.FromResult(textAndVersion)); Document = new DefaultDocumentSnapshot(project, documentState); } private SourceText SourceText { get; } private VersionStamp Version { get; } private HostDocument HostDocument { get; } private DefaultDocumentSnapshot Document { get; } protected override void ConfigureLanguageServices(List