Project model server cleanup

- Removed unused message types
- Removed intermediate ProjectInfo and ProjectState types
- Renamed Snapshot to ProjectSnapshot and ProjectSnapshot to ProjectContextSnapshot
- Exposed Project on ProjectContextCollection
- Removed AllDiagnostics message since it won't be used
- Renamed ProjectContextManager to ProjectManager
- Create project context snapshot in one pass
- Create project contexts lookup inline
- Consistent naming of payloads
This commit is contained in:
David Fowler 2016-01-02 00:44:59 -08:00
parent 41f4c926a7
commit 4b07b2d034
26 changed files with 244 additions and 461 deletions

View file

@ -83,33 +83,6 @@ namespace Microsoft.DotNet.ProjectModel.Server.Tests
}
}
[Fact]
public void DthCompilation_GetDiagnostics_OnEmptyConsoleApp()
{
var projectPath = _testHelper.FindSampleProject("EmptyConsoleApp");
Assert.NotNull(projectPath);
using (var server = new DthTestServer(_testHelper.LoggerFactory))
using (var client = new DthTestClient(server))
{
// Drain the inital messages
client.Initialize(projectPath);
client.SendPayLoad(projectPath, "GetDiagnostics");
var diagnosticsGroup = client.DrainTillFirst("AllDiagnostics")
.EnsureSource(server, client)
.RetrievePayloadAs<JArray>()
.AssertJArrayCount(3);
foreach (var group in diagnosticsGroup)
{
group.AsJObject()
.AssertProperty<JArray>("Errors", errorsArray => !errorsArray.Any())
.AssertProperty<JArray>("Warnings", warningsArray => !warningsArray.Any());
}
}
}
[Theory]
[InlineData("Project", "UnresolvedProjectSample", "EmptyLibrary", "Project")]
[InlineData("Package", "UnresolvedPackageSample", "NoSuchPackage", null)]