Beispiel #1
0
 public OrderService(IOrderPartService orderPartService, 
     IClock clock,
     ISerialisation serialisation) {
     _orderPartService = orderPartService;
     _clock = clock;
     _serialisation = serialisation;
 }
Beispiel #2
0
        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();
        }