コード例 #1
0
        public void Setup()
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-us");
            Thread.CurrentThread.CurrentCulture   = new CultureInfo("en-us");


            deliveryAddress = new Address {
                Surname    = "delivery-surname",
                Firstnames = "delivery-firstname",
                Address1   = "delivery-address1",
                Address2   = "delivery-address2",
                City       = "delivery-city",
                PostCode   = "delivery-postcode",
                State      = "delivery-state",
                Phone      = "delivery-phone",
                Country    = "delivery-country"
            };

            billingAddress = new Address {
                Surname    = "Surname",
                Firstnames = "Firstname",
                Address1   = "Address1",
                Address2   = "Address2",
                City       = "City",
                PostCode   = "postcode",
                Country    = "country",
                State      = "state",
                Phone      = "phone"
            };

            basket = new ShoppingBasket("My basket")
            {
                new BasketItem(1, "foo", 10.5m, 2.5m)
            };

            config = new Configuration {
                VendorName = "TestVendor"
            };

            urlResolver    = new StubUrlResolver();
            requestFactory = new Mock <IHttpRequestSender>();
            registration   = new TransactionRegistrar(config, urlResolver, requestFactory.Object);
        }
コード例 #2
0
		public void Setup() {
			Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-us");
			Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us");


			deliveryAddress = new Address {
				Surname = "delivery-surname",
				Firstnames = "delivery-firstname",
				Address1 = "delivery-address1",
				Address2 = "delivery-address2",
				City = "delivery-city",
				PostCode = "delivery-postcode",
				State = "delivery-state",
				Phone = "delivery-phone",
				Country = "delivery-country"
			};

			billingAddress = new Address {
				Surname = "Surname",
				Firstnames = "Firstname",
				Address1 = "Address1",
				Address2 = "Address2",
				City = "City",
				PostCode = "postcode",
				Country = "country",
				State = "state",
				Phone = "phone"
			};

			basket = new ShoppingBasket("My basket") {
     			new BasketItem(1, "foo", 10.5m, 2.5m)
			};

			config = new Configuration { VendorName = "TestVendor" };

			urlResolver = new StubUrlResolver();
			requestFactory = new Mock<IHttpRequestSender>();
			registration = new TransactionRegistrar(config, urlResolver, requestFactory.Object);
		}
コード例 #3
0
 public CreationController(ILogger <CreationController> logger, ITransactionRegistrar registrar, IMongoService service)
 {
     _logger    = logger;
     _registrar = registrar;
     _service   = service;
 }
コード例 #4
0
 public TransactionService(ITransactionRegistrar transactionRegistrar, IOrderRepository orderRepository)
 {
     _transactionRegistrar = transactionRegistrar;
     _orderRepository      = orderRepository;
 }
コード例 #5
0
		public TransactionService(ITransactionRegistrar transactionRegistrar, IOrderRepository orderRepository) {
			_transactionRegistrar = transactionRegistrar;
			_orderRepository = orderRepository;
		}