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); }
public void SetUp() { base.SetUp(); _shipmentApplicationServiceFactory = new ShipmentApplicationServiceProxyFactory(); _productApplicationServiceFactory = new ProductApplicationServiceProxyFactory(); //JsonConvert.DefaultSettings = () => new JsonSerializerSettings() //{ // ContractResolver = new CustomContractResolver() //}; }
public ProductApplicationService(IProductApplicationServiceFactory serviceFactory) { _serviceFactory = serviceFactory; }