diff --git a/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs b/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs index cac641a8cb..893036a593 100644 --- a/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs +++ b/src/Microsoft.AspNet.Diagnostics/ErrorPageMiddleware.cs @@ -15,6 +15,7 @@ using Microsoft.AspNet.Http; using Microsoft.Framework.Internal; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; +using Microsoft.Framework.Runtime.Compilation; namespace Microsoft.AspNet.Diagnostics { diff --git a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPageModel.cs b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPageModel.cs index a230ba52bf..a4ab32caaa 100644 --- a/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPageModel.cs +++ b/src/Microsoft.AspNet.Diagnostics/Views/RuntimeInfoPageModel.cs @@ -16,6 +16,6 @@ namespace Microsoft.AspNet.Diagnostics.Views public string RuntimeType { get; internal set; } - public IEnumerable References { get; internal set; } + public IEnumerable References { get; internal set; } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Diagnostics/project.json b/src/Microsoft.AspNet.Diagnostics/project.json index 9fd34de12c..9675c120f2 100644 --- a/src/Microsoft.AspNet.Diagnostics/project.json +++ b/src/Microsoft.AspNet.Diagnostics/project.json @@ -12,7 +12,7 @@ "Microsoft.Framework.OptionsModel": "1.0.0-*", "Microsoft.Framework.NotNullAttribute.Sources": { "type": "build", "version": "1.0.0-*" }, "Microsoft.Framework.WebEncoders.Core": "1.0.0-*", - "Microsoft.Framework.Runtime.Abstractions": "1.0.0-*", + "Microsoft.Framework.Runtime.Compilation.Abstractions": "1.0.0-*", "Microsoft.Framework.Logging.Abstractions": "1.0.0-*" }, "frameworks": { diff --git a/test/Microsoft.AspNet.Diagnostics.Tests/RuntimeInfoMiddlewareTest.cs b/test/Microsoft.AspNet.Diagnostics.Tests/RuntimeInfoMiddlewareTest.cs index c8184861bc..29ffa19ec8 100644 --- a/test/Microsoft.AspNet.Diagnostics.Tests/RuntimeInfoMiddlewareTest.cs +++ b/test/Microsoft.AspNet.Diagnostics.Tests/RuntimeInfoMiddlewareTest.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; @@ -38,9 +39,9 @@ namespace Microsoft.AspNet.Diagnostics.Tests public void CreateRuntimeInfoModel_GetsTheVersionAndAllPackages() { // Arrage - var libraries = new ILibraryInformation[] { - new FakeLibraryInformation() { Name ="LibInfo1", Path = "Path1" }, - new FakeLibraryInformation() { Name ="LibInfo2", Path = "Path2" }, + var libraries = new [] { + new Library("LibInfo1", string.Empty, "Path1", string.Empty, Enumerable.Empty(), Enumerable.Empty()), + new Library("LibInfo2", string.Empty, "Path2", string.Empty, Enumerable.Empty(), Enumerable.Empty()) }; var libraryManagerMock = new Mock(MockBehavior.Strict); @@ -109,9 +110,9 @@ namespace Microsoft.AspNet.Diagnostics.Tests { // Arrange var libraryManagerMock = new Mock(MockBehavior.Strict); - libraryManagerMock.Setup(l => l.GetLibraries()).Returns(new ILibraryInformation[] { - new FakeLibraryInformation() { Name ="LibInfo1", Version = "1.0.0-beta1", Path = "Path1" }, - new FakeLibraryInformation() { Name ="LibInfo2", Version = "1.0.0-beta2", Path = "Path2" }, + libraryManagerMock.Setup(l => l.GetLibraries()).Returns(new [] { + new Library("LibInfo1", "1.0.0-beta1", "Path1", string.Empty, Enumerable.Empty(), Enumerable.Empty()), + new Library("LibInfo2", "1.0.0-beta2", "Path2", string.Empty, Enumerable.Empty(), Enumerable.Empty()) }); var runtimeEnvironmentMock = new Mock(MockBehavior.Strict); @@ -169,8 +170,8 @@ namespace Microsoft.AspNet.Diagnostics.Tests { // Arrange var libraryManagerMock = new Mock(MockBehavior.Strict); - libraryManagerMock.Setup(l => l.GetLibraries()).Returns(new ILibraryInformation[] { - new FakeLibraryInformation() { Name ="LibInfo1", Version = "1.0.0-beta1", Path = "Path1" }, + libraryManagerMock.Setup(l => l.GetLibraries()).Returns(new [] { + new Library("LibInfo1", "1.0.0-beta1", "Path1", string.Empty, Enumerable.Empty(), Enumerable.Empty()), }); var runtimeEnvironmentMock = new Mock(MockBehavior.Strict); @@ -219,39 +220,6 @@ namespace Microsoft.AspNet.Diagnostics.Tests } #endif - private class FakeLibraryInformation : ILibraryInformation - { - public string Name { get; set; } - - public string Version { get; set; } - - public string Path { get; set; } - - public IEnumerable Dependencies - { - get - { - throw new NotImplementedException("Should not be needed by this middleware"); - } - } - - public string Type - { - get - { - throw new NotImplementedException("Should not be needed by this middleware"); - } - } - - public IEnumerable LoadableAssemblies - { - get - { - throw new NotImplementedException("Should not be needed by this middleware"); - } - } - } - private class CustomHtmlEncoder : IHtmlEncoder { public string HtmlEncode(string value)