- updated swagger description

- changed customer registration endpoint
- updated tests
This commit is contained in:
Main
2016-02-09 22:17:27 +03:00
parent cd35ac3d31
commit 92d0940222
19 changed files with 124 additions and 109 deletions

View File

@@ -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;
}
}

View File

@@ -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);