public MegaMergeServiceTests() { _companyA = Substitute.For<ICompanyUnitOfWork>(); _companyB = Substitute.For<ICompanyUnitOfWork>(); _mergedCatalog = Substitute.For<IMergedCatalogUnitOfWork>(); _megaMergeService = new MegaMergeService(_companyA, _companyB, _mergedCatalog); }
private IEnumerable <MergedCatalog> GetMergedCatalogs(ICompanyUnitOfWork company, string sourceName) { var mergedCatalogs = company .Catalogs .GetAll() .Select(x => new MergedCatalog { SKU = x.SKU, Description = x.Description, Source = sourceName }) .Distinct() .ToList(); var barcodes = company .Barcodes .GetAll() .ToList(); mergedCatalogs.ForEach(x => { x.Barcodes = barcodes .Where(y => y.SKU == x.SKU) .Select(y => y.Barcode) .ToList(); }); return(mergedCatalogs); }
internal GetCompanyCommand(ICompanyUnitOfWork companyUnitOfWork) { if (companyUnitOfWork == null) { throw new ArgumentNullException("companyUnitOfWork"); } _companyUnitOfWork = companyUnitOfWork; }
public BauService( ICompanyUnitOfWork companyA, ICompanyUnitOfWork companyB ) { CompanyA = companyA; CompanyB = companyB; }
internal AssignCustomerToBrokerCommand(ICompanyUnitOfWork companyUnitOfWork) { if (companyUnitOfWork == null) { throw new ArgumentNullException("companyUnitOfWork"); } _companyUnitOfWork = companyUnitOfWork; }
internal ContactCommandBase(ICompanyUnitOfWork companyUnitOfWork) { if (companyUnitOfWork == null) { throw new ArgumentNullException("companyUnitOfWork"); } CompanyUnitOfWork = companyUnitOfWork; }
internal RemoveCustomerFromBrokerCommand(ICompanyUnitOfWork companyUnitOfWork) { if (companyUnitOfWork == null) { throw new ArgumentNullException("companyUnitOfWork"); } _companyUnitOfWork = companyUnitOfWork; }
public MegaMergeService( ICompanyUnitOfWork companyA, ICompanyUnitOfWork companyB, IMergedCatalogUnitOfWork mergedCatalog ) { CompanyA = companyA; CompanyB = companyB; MergedCatalog = mergedCatalog; }
private Catalog SelectCatalogFromCompany(ICompanyUnitOfWork company) { Console.WriteLine("These are the Catalog B content:"); var catalogs = company.Catalogs.GetAll(); catalogs.Dump(); Console.Write("Please type SKU no:"); var sku = Console.ReadLine(); return(catalogs.FirstOrDefault(x => x.SKU == sku)); }
private Supplier InputNewSupplier(ICompanyUnitOfWork company) { Console.Write("Supplier Name: "); var name = Console.ReadLine(); var maxSupplierId = Convert.ToInt32(company.Suppliers.GetAll().Max(x => x.Id)); var supplierId = (maxSupplierId + 1).ToString("00000"); var supplier = new Supplier { Id = supplierId, Name = name }; return(supplier); }
public SyncDeleteCompanyContact(ICompanyUnitOfWork unitOfWork) : base(unitOfWork) { }
internal CustomerNoteConductor(ICompanyUnitOfWork companyUnitOfWork) { _companyUnitOfWork = companyUnitOfWork; }
internal CreateCompanyCommand(ICompanyUnitOfWork companyUnitOfWork) : base(companyUnitOfWork) { }
public BauServiceTests() { _companyA = Substitute.For <ICompanyUnitOfWork>(); _companyB = Substitute.For <ICompanyUnitOfWork>(); _bauService = new BauService(_companyA, _companyB); }
public CompanyService(ICompanyUnitOfWork companyUnitOfWork) { _companyUnitOfWork = companyUnitOfWork; }
internal UpdateContactCommand(ICompanyUnitOfWork companyUnitOfWork) : base(companyUnitOfWork) { }