public final class ChangeQuantity extends UpdateActionImpl<InventoryEntry>
See also InventoryEntryUpdateCommand.
withUpdateableInventoryEntry(client(), entry -> { final UpdateAction<InventoryEntry> action = ChangeQuantity.of(5000L); final InventoryEntry updatedEntry = client().executeBlocking(InventoryEntryUpdateCommand.of(entry, action)); assertThat(updatedEntry.getQuantityOnStock()).isEqualTo(5000); return updatedEntry; });
See the test code.
Modifier and Type | Method and Description |
---|---|
long |
getQuantity() |
static ChangeQuantity |
of(long quantity) |
getAction
public long getQuantity()
public static ChangeQuantity of(long quantity)