Fixing unit tests

This commit is contained in:
Sebastien Ros
2014-04-18 17:05:18 -07:00
parent c1ce98f2a1
commit 1916a3c351
2 changed files with 7 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ using Orchard.Tests.Stubs;
using Orchard.UI.Notify;
using Orchard.UI.PageClass;
using Orchard.Tests.Utility;
using Orchard.Messaging.Services;
using Orchard.Users.Services;
namespace Orchard.Tests.Modules.Comments.Services {
[TestFixture]
@@ -67,7 +69,11 @@ namespace Orchard.Tests.Modules.Comments.Services {
builder.RegisterInstance(ShellSettingsUtility.CreateEncryptionEnabled());
builder.RegisterType<ProcessingEngineStub>().As<IProcessingEngine>();
builder.RegisterType<StubShellDescriptorManager>().As<IShellDescriptorManager>();
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
builder.RegisterInstance(new Mock<IShapeTableLocator>().Object);
builder.RegisterInstance(new Mock<IShapeDisplay>().Object);
builder.RegisterInstance(new Mock<IMessageService>().Object);
builder.RegisterType<StubClock>().As<IClock>();
builder.RegisterInstance(new Mock<IPageClassBuilder>().Object);
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();

View File

@@ -33,7 +33,6 @@ namespace Orchard.Comments.Services {
private readonly IShapeFactory _shapeFactory;
private readonly IShapeDisplay _shapeDisplay;
private readonly IMessageService _messageService;
private readonly IMembershipService _membershipService;
public CommentService(
IOrchardServices orchardServices,
@@ -44,8 +43,7 @@ namespace Orchard.Comments.Services {
IShellDescriptorManager shellDescriptorManager,
IShapeFactory shapeFactory,
IShapeDisplay shapeDisplay,
IMessageService messageService,
IMembershipService membershipService
IMessageService messageService
) {
_orchardServices = orchardServices;
_clock = clock;
@@ -56,7 +54,6 @@ namespace Orchard.Comments.Services {
_shapeFactory = shapeFactory;
_shapeDisplay = shapeDisplay;
_messageService = messageService;
_membershipService = membershipService;
T = NullLocalizer.Instance;
Logger = NullLogger.Instance;