- updated swagger description
- changed customer registration endpoint - updated tests
This commit is contained in:
@@ -8,12 +8,16 @@ import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.Cust
|
||||
*/
|
||||
public class CustomerCreatedEvent implements Event {
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private CustomerInfo customerInfo;
|
||||
|
||||
public CustomerCreatedEvent() {
|
||||
}
|
||||
|
||||
public CustomerCreatedEvent(CustomerInfo customerInfo) {
|
||||
public CustomerCreatedEvent( String firstName, String lastName, CustomerInfo customerInfo) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
this.customerInfo = customerInfo;
|
||||
}
|
||||
|
||||
@@ -24,4 +28,20 @@ public class CustomerCreatedEvent implements Event {
|
||||
public void setCustomerInfo(CustomerInfo customerInfo) {
|
||||
this.customerInfo = customerInfo;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class AccountOpenEventSerializationTest {
|
||||
|
||||
@Test
|
||||
public void shouldSerde() {
|
||||
AccountOpenedEvent event = new AccountOpenedEvent(new BigDecimal(55));
|
||||
AccountOpenedEvent event = new AccountOpenedEvent("00000000-00000000", "My Account", new BigDecimal(55));
|
||||
String json = JSonMapper.toJson(event, EventStoreCommonObjectMapping.getObjectMapper());
|
||||
System.out.println("json=" + json);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user