コード例 #1
0
        public void SetUp()
        {
            this.httpWebRequest = (HttpWebRequest)WebRequest.Create(this.baseUrl);
            this.requestMock    = MockRepository.GenerateStub <IRequestFactory>();

            this.connector = ConnectorFactory.Create(this.requestMock, this.merchantId, this.secret, this.userAgent, this.baseUrl);
            this.order     = new Klarna.Rest.OrderManagement.Order(this.connector, this.orderId);
        }
コード例 #2
0
        public void Order_Constructor_NoOrderId()
        {
            // Arrange

            // Act
            this.order = new Klarna.Rest.OrderManagement.Order(this.connectorMock, string.Empty);

            // Assert
            Assert.AreEqual(this.order.Location, null);
        }
コード例 #3
0
        public void Order_Constructor_OrderId()
        {
            // Arrange

            // Act
            this.order = new Klarna.Rest.OrderManagement.Order(this.connectorMock, this.orderUrl);

            // Assert
            Assert.AreEqual(this.order.Location, this.order.Path + "/" + this.orderUrl);
        }
コード例 #4
0
        public void Order_Path_Basic()
        {
            // Arrange

            // Act
            this.order = new Klarna.Rest.OrderManagement.Order(this.connectorMock, string.Empty);

            // Assert
            Assert.AreEqual(this.path, this.order.Path);
        }
コード例 #5
0
 public void SetUp()
 {
     this.connectorMock = MockRepository.GenerateStub <IConnector>();
     this.order         = new Klarna.Rest.OrderManagement.Order(this.connectorMock, this.orderUrl);
 }