public OrderService(IOrderPartService orderPartService, IClock clock, ISerialisation serialisation) { _orderPartService = orderPartService; _clock = clock; _serialisation = serialisation; }
public PaypalTests() { var builder = new ContainerBuilder(); builder.RegisterType<StubClock>().As<IClock>(); builder.RegisterType<OrderService>().As<IOrderService>(); builder.RegisterType<Serialisation>().As<ISerialisation>(); _orderPartServiceMock = new Mock<IOrderPartService>(); _orderPartService = _orderPartServiceMock.Object; builder.RegisterInstance(_orderPartService).As<IOrderPartService>(); //var assembly = Assembly.GetAssembly(typeof(OrchardServices)); _container = builder.Build(); }