mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Fixing core UT
--HG-- branch : dev
This commit is contained in:
@@ -13,6 +13,9 @@ using Orchard.ContentManagement.Records;
|
||||
using Orchard.Core.Common.Handlers;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tests.Modules;
|
||||
@@ -30,6 +33,9 @@ namespace Orchard.Core.Tests.Body {
|
||||
builder.RegisterInstance(new Mock<IAuthorizer>().Object);
|
||||
builder.RegisterInstance(new Mock<INotifier>().Object);
|
||||
builder.RegisterType<OrchardServices>().As<IOrchardServices>();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||
|
||||
builder.RegisterType<ThingHandler>().As<IContentHandler>();
|
||||
|
||||
|
@@ -17,6 +17,9 @@ using Orchard.Core.Common.Services;
|
||||
using Orchard.Core.PublishLater.Services;
|
||||
using Orchard.Core.Scheduling.Models;
|
||||
using Orchard.Core.Scheduling.Services;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tasks.Scheduling;
|
||||
@@ -40,6 +43,9 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
builder.RegisterType<CommonService>().As<ICommonService>();
|
||||
builder.RegisterType<PublishingTaskManager>().As<IPublishingTaskManager>();
|
||||
builder.RegisterType<ScheduledTaskManager>().As<IScheduledTaskManager>();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||
|
||||
_authn = new Mock<IAuthenticationService>();
|
||||
_authz = new Mock<IAuthorizationService>();
|
||||
|
@@ -16,6 +16,9 @@ using Orchard.Core.Routable.Handlers;
|
||||
using Orchard.Core.Routable.Models;
|
||||
using Orchard.Core.Routable.Services;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Security;
|
||||
using Orchard.Tests.Modules;
|
||||
@@ -46,6 +49,9 @@ namespace Orchard.Core.Tests.Routable.Services {
|
||||
builder.RegisterType<StuffHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<RoutableService>().As<IRoutableService>();
|
||||
builder.RegisterType<RoutablePathConstraint>().As<IRoutablePathConstraint>();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||
|
||||
builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
|
||||
builder.RegisterInstance(new UrlHelper(new RequestContext(new StubHttpContext("~/"), new RouteData()))).As<UrlHelper>();
|
||||
|
@@ -9,6 +9,9 @@ using Orchard.ContentManagement.Records;
|
||||
using Orchard.Core.Scheduling.Models;
|
||||
using Orchard.Core.Scheduling.Services;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Tasks;
|
||||
using Orchard.Tasks.Scheduling;
|
||||
using Orchard.Tests.Modules;
|
||||
@@ -30,6 +33,9 @@ namespace Orchard.Core.Tests.Scheduling {
|
||||
builder.RegisterInstance(new Mock<IOrchardServices>().Object);
|
||||
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
|
||||
|
||||
builder.RegisterType<ScheduledTaskExecutor>().As<IBackgroundTask>().Named("ScheduledTaskExecutor", typeof(IBackgroundTask));
|
||||
|
@@ -10,6 +10,9 @@ using Orchard.ContentManagement.Records;
|
||||
using Orchard.Core.Scheduling.Models;
|
||||
using Orchard.Core.Scheduling.Services;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Tasks.Scheduling;
|
||||
using Orchard.Tests.Modules;
|
||||
|
||||
@@ -34,6 +37,9 @@ namespace Orchard.Core.Tests.Scheduling {
|
||||
builder.RegisterInstance(_mockServices.Object);
|
||||
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<ShapeHelperFactory>().As<IShapeHelperFactory>();
|
||||
builder.RegisterInstance(new Mock<IContentDefinitionManager>().Object);
|
||||
|
||||
builder.RegisterType<ScheduledTaskManager>().As<IScheduledTaskManager>();
|
||||
|
Reference in New Issue
Block a user