public void GetNewAddress_WithAccountParameterSet_ThrowsException() { RPCServerException exception = Assert.Throws <RPCServerException>(() => { NewAddressModel result = this.controller.GetNewAddress("test"); }); Assert.NotNull(exception); Assert.Equal("Use of 'account' parameter has been deprecated", exception.Message); }
public void GetNewAddress_WithIncompatibleAddressType_ThrowsException() { RPCServerException exception = Assert.Throws <RPCServerException>(() => { NewAddressModel result = this.controller.GetNewAddress("", "x"); }); Assert.NotNull(exception); Assert.Equal("Only address type 'legacy' is currently supported.", exception.Message); }
public async Task <IActionResult> UpdateOrderAddress( Guid orderId, [FromBody] NewAddressModel newAddress) { var updateAddressCommand = new UpdateOrderAddressCommand( orderId, newAddress.DeptNumber, newAddress.City, newAddress.Street, newAddress.StreetNumber); await this.orderOpsService.UpdateOrderAddress(updateAddressCommand); return(this.StatusCode((int)HttpStatusCode.NoContent)); }