From 26d03049ec36285968e9c7e47cc5bd9019c1e577 Mon Sep 17 00:00:00 2001 From: Michael Hierweck Date: Wed, 19 Apr 2017 13:48:09 +0200 Subject: [PATCH] merge changes from master branch --- .../src/main/java/de/hsadmin/bo/customer/MemberAsset.java | 6 +++--- .../customer/{AssetAction.java => MemberAssetAction.java} | 5 ++--- .../src/main/java/de/hsadmin/bo/customer/MemberShare.java | 6 +++--- .../customer/{ShareAction.java => MemberShareAction.java} | 3 ++- .../de/hsadmin/bo/customer/CustomerPackageBoPojoTest.java | 4 ++-- .../test/java/de/hsadmin/bo/customer/MemberAssetTest.java | 2 +- .../test/java/de/hsadmin/bo/customer/MemberShareTest.java | 2 +- .../hsadmin/service/customer/MemberShareServiceTest.java | 8 ++++---- 8 files changed, 18 insertions(+), 18 deletions(-) rename cust-services/src/main/java/de/hsadmin/bo/customer/{AssetAction.java => MemberAssetAction.java} (88%) rename cust-services/src/main/java/de/hsadmin/bo/customer/{ShareAction.java => MemberShareAction.java} (84%) diff --git a/cust-services/src/main/java/de/hsadmin/bo/customer/MemberAsset.java b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberAsset.java index e5b12a1..873e721 100644 --- a/cust-services/src/main/java/de/hsadmin/bo/customer/MemberAsset.java +++ b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberAsset.java @@ -36,7 +36,7 @@ public class MemberAsset implements Serializable { private Date date; @Column(name="action", nullable = false) - private AssetAction action; + private MemberAssetAction action; @Column(name="amount", nullable = false) private BigDecimal amount; @@ -76,11 +76,11 @@ public class MemberAsset implements Serializable { this.date = date; } - public AssetAction getAction() { + public MemberAssetAction getAction() { return action; } - public void setAction(AssetAction action) { + public void setAction(MemberAssetAction action) { this.action = action; } diff --git a/cust-services/src/main/java/de/hsadmin/bo/customer/AssetAction.java b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberAssetAction.java similarity index 88% rename from cust-services/src/main/java/de/hsadmin/bo/customer/AssetAction.java rename to cust-services/src/main/java/de/hsadmin/bo/customer/MemberAssetAction.java index 59ea66b..68150ae 100644 --- a/cust-services/src/main/java/de/hsadmin/bo/customer/AssetAction.java +++ b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberAssetAction.java @@ -3,9 +3,8 @@ package de.hsadmin.bo.customer; /** * Transaktionstyp für Geschaeftsguthaben {@link MemberAsset}. */ -public enum AssetAction { - - /** Einzahlung */ +public enum MemberAssetAction { + PAYMENT, /** Auszahlung * diff --git a/cust-services/src/main/java/de/hsadmin/bo/customer/MemberShare.java b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberShare.java index 20df8a1..81dab67 100644 --- a/cust-services/src/main/java/de/hsadmin/bo/customer/MemberShare.java +++ b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberShare.java @@ -35,7 +35,7 @@ public class MemberShare implements Serializable { private Date date; @Column(name="action", nullable = false) - private ShareAction action; + private MemberShareAction action; @Column(name="quantity", nullable = false) private int quantity; @@ -67,11 +67,11 @@ public class MemberShare implements Serializable { this.date = date; } - public ShareAction getAction() { + public MemberShareAction getAction() { return action; } - public void setAction(ShareAction action) { + public void setAction(MemberShareAction action) { this.action = action; } diff --git a/cust-services/src/main/java/de/hsadmin/bo/customer/ShareAction.java b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberShareAction.java similarity index 84% rename from cust-services/src/main/java/de/hsadmin/bo/customer/ShareAction.java rename to cust-services/src/main/java/de/hsadmin/bo/customer/MemberShareAction.java index 63a75e8..5e27fbd 100644 --- a/cust-services/src/main/java/de/hsadmin/bo/customer/ShareAction.java +++ b/cust-services/src/main/java/de/hsadmin/bo/customer/MemberShareAction.java @@ -2,7 +2,8 @@ package de.hsadmin.bo.customer; /** Transaktionstyp für Geschaeftsanteile {@link MemberShare}. */ -public enum ShareAction { +public enum MemberShareAction { + /** Zeichnung */ SUBSCRIPTION, diff --git a/cust-services/src/test/java/de/hsadmin/bo/customer/CustomerPackageBoPojoTest.java b/cust-services/src/test/java/de/hsadmin/bo/customer/CustomerPackageBoPojoTest.java index 537b57d..59994c7 100644 --- a/cust-services/src/test/java/de/hsadmin/bo/customer/CustomerPackageBoPojoTest.java +++ b/cust-services/src/test/java/de/hsadmin/bo/customer/CustomerPackageBoPojoTest.java @@ -16,8 +16,8 @@ public class CustomerPackageBoPojoTest { include(de.hsadmin.bo.customer.IndicatorVAT.class), include(de.hsadmin.bo.customer.SEPADirectDebit.class), include(de.hsadmin.bo.customer.MemberShare.class), - include(de.hsadmin.bo.customer.ShareAction.class), + include(de.hsadmin.bo.customer.MemberShareAction.class), include(de.hsadmin.bo.customer.MemberAsset.class), - include(de.hsadmin.bo.customer.AssetAction.class)); + include(de.hsadmin.bo.customer.MemberAssetAction.class)); } } diff --git a/cust-services/src/test/java/de/hsadmin/bo/customer/MemberAssetTest.java b/cust-services/src/test/java/de/hsadmin/bo/customer/MemberAssetTest.java index 74328ad..8ab4009 100644 --- a/cust-services/src/test/java/de/hsadmin/bo/customer/MemberAssetTest.java +++ b/cust-services/src/test/java/de/hsadmin/bo/customer/MemberAssetTest.java @@ -29,7 +29,7 @@ public class MemberAssetTest extends JpaBasedTest { public static MemberAsset createNewMemberAsset(final Customer customer) { MemberAsset newEntity = new MemberAsset(); newEntity.setCustomer(customer); - newEntity.setAction(AssetAction.PAYMENT); + newEntity.setAction(MemberAssetAction.PAYMENT); newEntity.setDate(new LocalDate(2017, 4, 13).toDate()); newEntity.setAmount(new BigDecimal("1234.56")); newEntity.setComment("test comment"); diff --git a/cust-services/src/test/java/de/hsadmin/bo/customer/MemberShareTest.java b/cust-services/src/test/java/de/hsadmin/bo/customer/MemberShareTest.java index 00c7b04..ae3a668 100644 --- a/cust-services/src/test/java/de/hsadmin/bo/customer/MemberShareTest.java +++ b/cust-services/src/test/java/de/hsadmin/bo/customer/MemberShareTest.java @@ -27,7 +27,7 @@ public class MemberShareTest extends JpaBasedTest { public static MemberShare createNewMemberShare(final Customer customer) { MemberShare newEntity = new MemberShare(); newEntity.setCustomer(customer); - newEntity.setAction(ShareAction.SUBSCRIPTION); + newEntity.setAction(MemberShareAction.SUBSCRIPTION); newEntity.setDate(new LocalDate(2017, 4, 13).toDate()); newEntity.setQuantity(5); newEntity.setComment("test comment"); diff --git a/cust-services/src/test/java/de/hsadmin/service/customer/MemberShareServiceTest.java b/cust-services/src/test/java/de/hsadmin/service/customer/MemberShareServiceTest.java index 51ac1f1..bb812b8 100644 --- a/cust-services/src/test/java/de/hsadmin/service/customer/MemberShareServiceTest.java +++ b/cust-services/src/test/java/de/hsadmin/service/customer/MemberShareServiceTest.java @@ -19,7 +19,7 @@ import org.mockito.MockitoAnnotations; import de.hsadmin.bo.customer.Customer; import de.hsadmin.bo.customer.MemberShare; -import de.hsadmin.bo.customer.ShareAction; +import de.hsadmin.bo.customer.MemberShareAction; import de.hsadmin.common.error.TechnicalException; import de.hsadmin.common.error.UserException; import de.hsadmin.dao.customer.CustomerDao; @@ -86,8 +86,8 @@ public class MemberShareServiceTest { givenLoginRole(Role.SYSTEM); Customer fakeCustomer = givenFakeCustomerWithName("testCust"); MemberShareVO prototypeVO = MemberShareVOTest.givenEmptyMemberShareVOForCustomer(fakeCustomer.getName()); - MemberShare memberShare1 = givenFakeMemberShare(fakeCustomer, ShareAction.SUBSCRIPTION, 4 ); - MemberShare memberShare2 = givenFakeMemberShare(fakeCustomer, ShareAction.UNSUBSCRIPTION, 2 ); + MemberShare memberShare1 = givenFakeMemberShare(fakeCustomer, MemberShareAction.SUBSCRIPTION, 4 ); + MemberShare memberShare2 = givenFakeMemberShare(fakeCustomer, MemberShareAction.UNSUBSCRIPTION, 2 ); givenCriteriaQueryResult(prototypeVO, memberShare1, memberShare2); // when @@ -136,7 +136,7 @@ public class MemberShareServiceTest { return fakeCustomer; } - private MemberShare givenFakeMemberShare(Customer customer, ShareAction action, int quantity) { + private MemberShare givenFakeMemberShare(Customer customer, MemberShareAction action, int quantity) { MemberShare share = new MemberShare(); share.setCustomer(customer); share.setAction(action);