public CancelOrderApiModel(VisitorCancelOrderResult result) : base(result) { Assert.ArgumentNotNull(result, nameof(result)); if (result.CancellationStatus != null) { CancellationStatus = result.CancellationStatus.Name; } }
/// <summary> /// Initializes a new instance of the <see cref="CancelOrderBaseJsonResult"/> class. /// </summary> /// <param name="result">The result.</param> public CancelOrderBaseJsonResult(VisitorCancelOrderResult result) : base(result) { Assert.ArgumentNotNull(result, "result"); if (result.CancellationStatus != null) { this.CancellationStatus = result.CancellationStatus.Name; } }
/// <summary> /// Initializes a new instance of the <see cref="OrderCancelTest"/> class. /// </summary> public CancelOrderTest() { this.orderId = 1; this.customerId = 1; this.request = new VisitorCancelOrderRequest(this.orderId.ToString(), this.customerId.ToString(), "NopShop"); this.result = new VisitorCancelOrderResult(); this.args = new ServicePipelineArgs(this.request, this.result); this.client = Substitute.For <IOrdersServiceChannel>(); var clientFactory = Substitute.For <ServiceClientFactory>(); clientFactory.CreateClient <IOrdersServiceChannel>(Arg.Any <string>(), Arg.Any <string>()).Returns(this.client); this.processor = new CancelOrder { ClientFactory = clientFactory }; }