mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Updating Owin assemlies, and fixing broken unit tests
This commit is contained in:
parent
4b0a0d21be
commit
633615eb5c
Binary file not shown.
@ -145,24 +145,6 @@
|
||||
Looks up a localized string similar to The '{0}' method on class '{1}' does not have the expected signature 'void {0}(IAppBuilder)'..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Owin.Host.SystemWeb.AuthenticationResult">
|
||||
<summary></summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Owin.Host.SystemWeb.AuthenticationResult.#ctor(System.Security.Principal.IIdentity,System.Collections.Generic.IDictionary{System.String,System.String},System.Collections.Generic.IDictionary{System.String,System.Object})">
|
||||
<summary></summary>
|
||||
<param name="identity"></param>
|
||||
<param name="extra"></param>
|
||||
<param name="properties"></param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Owin.Host.SystemWeb.AuthenticationResult.Identity">
|
||||
<summary></summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Owin.Host.SystemWeb.AuthenticationResult.Extra">
|
||||
<summary></summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Owin.Host.SystemWeb.AuthenticationResult.Properties">
|
||||
<summary></summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Owin.Host.SystemWeb.DataProtection.MachineKeyDataProtectionProvider">
|
||||
<summary>
|
||||
Used to provide the data protection services that are derived from the MachineKey API. It is the best choice of
|
||||
@ -177,35 +159,39 @@
|
||||
<returns>An instance of a data protection service</returns>
|
||||
</member>
|
||||
<member name="T:System.Web.HttpContextBaseExtensions">
|
||||
<summary>Provides extension methods for <see cref="T:System.Web.HttpContextBase"/>.</summary>
|
||||
<summary>
|
||||
Provides extension methods for <see cref="T:System.Web.HttpContextBase"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.HttpContextBaseExtensions.GetOwinContext(System.Web.HttpContextBase)">
|
||||
<summary>
|
||||
|
||||
Gets the <see cref="T:Microsoft.Owin.IOwinContext"/> for the current request.
|
||||
</summary>
|
||||
<param name="context"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Web.HttpContextBaseExtensions.GetOwinContext(System.Web.HttpRequestBase)">
|
||||
<summary>
|
||||
|
||||
Gets the <see cref="T:Microsoft.Owin.IOwinContext"/> for the current request.
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:System.Web.HttpContextExtensions">
|
||||
<summary>Provides extension methods for <see cref="T:System.Web.HttpContext"/>.</summary>
|
||||
<summary>
|
||||
Provides extension methods for <see cref="T:System.Web.HttpContext"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Web.HttpContextExtensions.GetOwinContext(System.Web.HttpContext)">
|
||||
<summary>
|
||||
|
||||
Gets the <see cref="T:Microsoft.Owin.IOwinContext"/> for the current request.
|
||||
</summary>
|
||||
<param name="context"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:System.Web.HttpContextExtensions.GetOwinContext(System.Web.HttpRequest)">
|
||||
<summary>
|
||||
|
||||
Gets the <see cref="T:Microsoft.Owin.IOwinContext"/> for the current request.
|
||||
</summary>
|
||||
<param name="request"></param>
|
||||
<returns></returns>
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -19,6 +19,7 @@ using Orchard.FileSystems.AppData;
|
||||
using Orchard.FileSystems.VirtualPath;
|
||||
using Orchard.Mvc.ModelBinders;
|
||||
using Orchard.Mvc.Routes;
|
||||
using Orchard.Owin;
|
||||
using Orchard.Tests.Environment.TestDependencies;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.Tests.Utility;
|
||||
@ -62,7 +63,9 @@ namespace Orchard.Tests.Environment {
|
||||
.Ignore<IExtensionFolders>()
|
||||
.Ignore<IRouteProvider>()
|
||||
.Ignore<IHttpRouteProvider>()
|
||||
.Ignore<IModelBinderProvider>();
|
||||
.Ignore<IModelBinderProvider>()
|
||||
.Ignore<IWorkContextEvents>()
|
||||
.Ignore<IOwinMiddlewareProvider>();
|
||||
});
|
||||
_lifetime = _container.BeginLifetimeScope();
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
@ -47,7 +48,12 @@ namespace Orchard.Tests.Mvc.Routes {
|
||||
|
||||
rootBuilder.Register<Func<RouteBase, ShellRoute>>(c => {
|
||||
var context = c.Resolve<IComponentContext>();
|
||||
return new
|
||||
return new Func<RouteBase, ShellRoute>(routeBase =>
|
||||
new ShellRoute(
|
||||
routeBase,
|
||||
_settingsA,
|
||||
context.Resolve<IWorkContextAccessor>(),
|
||||
context.Resolve<IRunningShellTable>(), objects => { return null; }));
|
||||
});
|
||||
|
||||
_rootContainer = rootBuilder.Build();
|
||||
@ -69,30 +75,34 @@ namespace Orchard.Tests.Mvc.Routes {
|
||||
|
||||
[Test]
|
||||
public void FactoryMethodWillCreateShellRoutes() {
|
||||
var settings = new ShellSettings { Name = "Alpha" };
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterType<ShellRoute>().InstancePerDependency();
|
||||
builder.RegisterAutoMocking();
|
||||
builder.Register(ctx => settings);
|
||||
|
||||
var container = builder.Build();
|
||||
var buildShellRoute = container.Resolve<Func<RouteBase, ShellRoute>>();
|
||||
var buildShellRoute = new Func<RouteBase, ShellRoute>(routeBase =>
|
||||
new ShellRoute(
|
||||
routeBase,
|
||||
_settingsA,
|
||||
container.Resolve<IWorkContextAccessor>(),
|
||||
container.Resolve<IRunningShellTable>(),
|
||||
objects => { return null; }));
|
||||
|
||||
var routeA = new Route("foo", new MvcRouteHandler());
|
||||
var route1 = buildShellRoute(routeA);
|
||||
|
||||
var routeB = new Route("bar", new MvcRouteHandler()) {
|
||||
DataTokens = new RouteValueDictionary { { "area", "Beta" } }
|
||||
DataTokens = new RouteValueDictionary { { "area", _settingsB.Name } }
|
||||
};
|
||||
var route2 = buildShellRoute(routeB);
|
||||
|
||||
Assert.That(route1, Is.Not.SameAs(route2));
|
||||
|
||||
Assert.That(route1.ShellSettingsName, Is.EqualTo("Alpha"));
|
||||
Assert.That(route1.ShellSettingsName, Is.EqualTo(_settingsA.Name));
|
||||
Assert.That(route1.Area, Is.Null);
|
||||
|
||||
Assert.That(route2.ShellSettingsName, Is.EqualTo("Alpha"));
|
||||
Assert.That(route2.Area, Is.EqualTo("Beta"));
|
||||
Assert.That(route2.ShellSettingsName, Is.EqualTo(_settingsA.Name));
|
||||
Assert.That(route2.Area, Is.EqualTo(_settingsB.Name));
|
||||
}
|
||||
|
||||
|
||||
@ -203,7 +213,13 @@ namespace Orchard.Tests.Mvc.Routes {
|
||||
.Returns(settings);
|
||||
|
||||
|
||||
var shellRouteFactory = container.Resolve<Func<RouteBase, ShellRoute>>();
|
||||
var shellRouteFactory = new Func<RouteBase, ShellRoute>(routeBase =>
|
||||
new ShellRoute(
|
||||
routeBase,
|
||||
settings,
|
||||
container.Resolve<IWorkContextAccessor>(),
|
||||
container.Resolve<IRunningShellTable>(),
|
||||
objects => { return null; }));
|
||||
|
||||
var helloRoute = shellRouteFactory(new Route(
|
||||
"hello",
|
||||
|
@ -50,6 +50,9 @@
|
||||
<HintPath>..\..\lib\autofac\Autofac.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.SystemWeb">
|
||||
<HintPath>..\..\lib\owin\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\lib\aspnetmvc\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<add key="webpages:Enabled" value="false"/>
|
||||
<add key="webpages:Version" value="3.0.0.0"/>
|
||||
<add key="log4net.Config" value="Config\log4net.config"/>
|
||||
<add key="owin:AppStartup" value="Orchard.Owin.Startup, Orchard.Framework" />
|
||||
<add key="owin:AppStartup" value="Orchard.Owin.Startup, Orchard.Framework" />
|
||||
</appSettings>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
|
Loading…
Reference in New Issue
Block a user