com.networknt.eventuate.test.domain.MoneyTransfer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of test-domain Show documentation
Show all versions of test-domain Show documentation
Test banking domain objects.
package com.networknt.eventuate.test.domain;
import com.networknt.eventuate.common.Event;
import com.networknt.eventuate.common.EventUtil;
import com.networknt.eventuate.common.ReflectiveMutableCommandProcessingAggregate;
import java.util.List;
public class MoneyTransfer extends ReflectiveMutableCommandProcessingAggregate {
public List process(CreateMoneyTransferCommand cmd) {
return EventUtil.events(new MoneyTransferCreatedEvent(cmd.getDetails()));
}
public void apply(AccountCreatedEvent event) {
// TODO - do something
}
}