public StubDataCountryRepository(MemoryRepository <Country> memRepository)
        {
            this._memRepository = memRepository;

            memRepository.Add(Country.Create(new Guid("229074BD-2356-4B5A-8619-CDEBBA71CC21"), "United Kingdom"));
            memRepository.Add(Country.Create(new Guid("F3C78DD5-026F-4402-8A19-DAA956ACE593"), "United States"));
        }
        public StubDataProductCodeRepository(MemoryRepository <ProductCode> memRepository)
        {
            this._memRepository = memRepository;

            this._memRepository.Add(ProductCode.Create(new Guid("B2773EBF-CD0C-4F31-83E2-691973E32531"), "HD"));
            this._memRepository.Add(ProductCode.Create(new Guid("A4E934EF-C40D-41B3-87DF-C65F8DDD6C23"), "VK"));
        }
        public StubDataProductRepository(MemoryRepository <Product> memRepository)
        {
            this._memRepository = memRepository;

            this._memRepository.Add(Product.Create(new Guid("65D03D7E-E41A-49BC-8680-DC942BABD10A"), "iPhone", 2, 500.02m,
                                                   ProductCode.Create(new Guid("B2773EBF-CD0C-4F31-83E2-691973E32531"), "HD")));
        }
        public StubDataCustomerRepository(MemoryRepository <Customer> memRepository)
        {
            _memRepository = memRepository;
            var customer = Customer.Create(new Guid("5D5020DA-47DF-4C82-A722-C8DEAF06AE23"), "john", "smith", "*****@*****.**",
                                           Country.Create(new Guid("229074BD-2356-4B5A-8619-CDEBBA71CC21"), "United Kingdom"));

            customer.Add(CreditCard.Create(customer, "MR J SMITH", "123122131", DateTime.Today.AddDays(1)));

            _memRepository.Add(customer);
        }
Exemple #5
0
        public StubDataCountryTaxRepository(MemoryRepository <CountryTax> memRepository)
        {
            this._memRepository = memRepository;

            var countryUK = Country.Create(new Guid("229074BD-2356-4B5A-8619-CDEBBA71CC21"), "United Kingdom");
            var countryUS = Country.Create(new Guid("F3C78DD5-026F-4402-8A19-DAA956ACE593"), "United States");

            this._memRepository.Add(CountryTax.Create(new Guid("6A506865-AF49-496C-BFE1-747759B76F4A"), TaxType.Business, countryUK, 0.05m));
            this._memRepository.Add(CountryTax.Create(new Guid("D8B4C943-FCB7-4718-A56E-8B30D02992E7"), TaxType.Customer, countryUK, 0.10m));
            this._memRepository.Add(CountryTax.Create(new Guid("7F7D433B-3052-446F-99BF-A3514B7C50BA"), TaxType.Business, countryUS, 0.07m));
            this._memRepository.Add(CountryTax.Create(new Guid("1205C310-447A-48AA-A2F1-13B3E99C353E"), TaxType.Customer, countryUS, 0.15m));
        }