Example #1
0
 public ProductApplicationTests()
 {
     // In real world with DI I would simply use DI to have this factory as a singleton.
     // Or I would implement my own singleton, but as it's out of scope of this task, I just think it's worth to mention
     _productApplicationFactory = new ProductApplicationServiceFactory();
     InitStrategies();
     _sut = new ProductApplicationService(_productApplicationFactory);
 }
Example #2
0
        public void SetUp()
        {
            base.SetUp();

            _shipmentApplicationServiceFactory = new ShipmentApplicationServiceProxyFactory();
            _productApplicationServiceFactory  = new ProductApplicationServiceProxyFactory();
            //JsonConvert.DefaultSettings = () => new JsonSerializerSettings()
            //{
            //    ContractResolver = new CustomContractResolver()
            //};
        }
Example #3
0
 public ProductApplicationService(IProductApplicationServiceFactory serviceFactory)
 {
     _serviceFactory = serviceFactory;
 }