merge changes from master branch
This commit is contained in:
parent
886580156e
commit
26d03049ec
@ -36,7 +36,7 @@ public class MemberAsset implements Serializable {
|
|||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
@Column(name="action", nullable = false)
|
@Column(name="action", nullable = false)
|
||||||
private AssetAction action;
|
private MemberAssetAction action;
|
||||||
|
|
||||||
@Column(name="amount", nullable = false)
|
@Column(name="amount", nullable = false)
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
@ -76,11 +76,11 @@ public class MemberAsset implements Serializable {
|
|||||||
this.date = date;
|
this.date = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssetAction getAction() {
|
public MemberAssetAction getAction() {
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAction(AssetAction action) {
|
public void setAction(MemberAssetAction action) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,8 @@ package de.hsadmin.bo.customer;
|
|||||||
/**
|
/**
|
||||||
* Transaktionstyp für Geschaeftsguthaben {@link MemberAsset}.
|
* Transaktionstyp für Geschaeftsguthaben {@link MemberAsset}.
|
||||||
*/
|
*/
|
||||||
public enum AssetAction {
|
public enum MemberAssetAction {
|
||||||
|
|
||||||
/** Einzahlung */
|
|
||||||
PAYMENT,
|
PAYMENT,
|
||||||
|
|
||||||
/** Auszahlung *
|
/** Auszahlung *
|
@ -35,7 +35,7 @@ public class MemberShare implements Serializable {
|
|||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
@Column(name="action", nullable = false)
|
@Column(name="action", nullable = false)
|
||||||
private ShareAction action;
|
private MemberShareAction action;
|
||||||
|
|
||||||
@Column(name="quantity", nullable = false)
|
@Column(name="quantity", nullable = false)
|
||||||
private int quantity;
|
private int quantity;
|
||||||
@ -67,11 +67,11 @@ public class MemberShare implements Serializable {
|
|||||||
this.date = date;
|
this.date = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShareAction getAction() {
|
public MemberShareAction getAction() {
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAction(ShareAction action) {
|
public void setAction(MemberShareAction action) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,8 @@ package de.hsadmin.bo.customer;
|
|||||||
|
|
||||||
/** Transaktionstyp für Geschaeftsanteile {@link MemberShare}.
|
/** Transaktionstyp für Geschaeftsanteile {@link MemberShare}.
|
||||||
*/
|
*/
|
||||||
public enum ShareAction {
|
public enum MemberShareAction {
|
||||||
|
|
||||||
|
|
||||||
/** Zeichnung */
|
/** Zeichnung */
|
||||||
SUBSCRIPTION,
|
SUBSCRIPTION,
|
@ -16,8 +16,8 @@ public class CustomerPackageBoPojoTest {
|
|||||||
include(de.hsadmin.bo.customer.IndicatorVAT.class),
|
include(de.hsadmin.bo.customer.IndicatorVAT.class),
|
||||||
include(de.hsadmin.bo.customer.SEPADirectDebit.class),
|
include(de.hsadmin.bo.customer.SEPADirectDebit.class),
|
||||||
include(de.hsadmin.bo.customer.MemberShare.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.MemberAsset.class),
|
||||||
include(de.hsadmin.bo.customer.AssetAction.class));
|
include(de.hsadmin.bo.customer.MemberAssetAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ public class MemberAssetTest extends JpaBasedTest {
|
|||||||
public static MemberAsset createNewMemberAsset(final Customer customer) {
|
public static MemberAsset createNewMemberAsset(final Customer customer) {
|
||||||
MemberAsset newEntity = new MemberAsset();
|
MemberAsset newEntity = new MemberAsset();
|
||||||
newEntity.setCustomer(customer);
|
newEntity.setCustomer(customer);
|
||||||
newEntity.setAction(AssetAction.PAYMENT);
|
newEntity.setAction(MemberAssetAction.PAYMENT);
|
||||||
newEntity.setDate(new LocalDate(2017, 4, 13).toDate());
|
newEntity.setDate(new LocalDate(2017, 4, 13).toDate());
|
||||||
newEntity.setAmount(new BigDecimal("1234.56"));
|
newEntity.setAmount(new BigDecimal("1234.56"));
|
||||||
newEntity.setComment("test comment");
|
newEntity.setComment("test comment");
|
||||||
|
@ -27,7 +27,7 @@ public class MemberShareTest extends JpaBasedTest {
|
|||||||
public static MemberShare createNewMemberShare(final Customer customer) {
|
public static MemberShare createNewMemberShare(final Customer customer) {
|
||||||
MemberShare newEntity = new MemberShare();
|
MemberShare newEntity = new MemberShare();
|
||||||
newEntity.setCustomer(customer);
|
newEntity.setCustomer(customer);
|
||||||
newEntity.setAction(ShareAction.SUBSCRIPTION);
|
newEntity.setAction(MemberShareAction.SUBSCRIPTION);
|
||||||
newEntity.setDate(new LocalDate(2017, 4, 13).toDate());
|
newEntity.setDate(new LocalDate(2017, 4, 13).toDate());
|
||||||
newEntity.setQuantity(5);
|
newEntity.setQuantity(5);
|
||||||
newEntity.setComment("test comment");
|
newEntity.setComment("test comment");
|
||||||
|
@ -19,7 +19,7 @@ import org.mockito.MockitoAnnotations;
|
|||||||
|
|
||||||
import de.hsadmin.bo.customer.Customer;
|
import de.hsadmin.bo.customer.Customer;
|
||||||
import de.hsadmin.bo.customer.MemberShare;
|
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.TechnicalException;
|
||||||
import de.hsadmin.common.error.UserException;
|
import de.hsadmin.common.error.UserException;
|
||||||
import de.hsadmin.dao.customer.CustomerDao;
|
import de.hsadmin.dao.customer.CustomerDao;
|
||||||
@ -86,8 +86,8 @@ public class MemberShareServiceTest {
|
|||||||
givenLoginRole(Role.SYSTEM);
|
givenLoginRole(Role.SYSTEM);
|
||||||
Customer fakeCustomer = givenFakeCustomerWithName("testCust");
|
Customer fakeCustomer = givenFakeCustomerWithName("testCust");
|
||||||
MemberShareVO prototypeVO = MemberShareVOTest.givenEmptyMemberShareVOForCustomer(fakeCustomer.getName());
|
MemberShareVO prototypeVO = MemberShareVOTest.givenEmptyMemberShareVOForCustomer(fakeCustomer.getName());
|
||||||
MemberShare memberShare1 = givenFakeMemberShare(fakeCustomer, ShareAction.SUBSCRIPTION, 4 );
|
MemberShare memberShare1 = givenFakeMemberShare(fakeCustomer, MemberShareAction.SUBSCRIPTION, 4 );
|
||||||
MemberShare memberShare2 = givenFakeMemberShare(fakeCustomer, ShareAction.UNSUBSCRIPTION, 2 );
|
MemberShare memberShare2 = givenFakeMemberShare(fakeCustomer, MemberShareAction.UNSUBSCRIPTION, 2 );
|
||||||
givenCriteriaQueryResult(prototypeVO, memberShare1, memberShare2);
|
givenCriteriaQueryResult(prototypeVO, memberShare1, memberShare2);
|
||||||
|
|
||||||
// when
|
// when
|
||||||
@ -136,7 +136,7 @@ public class MemberShareServiceTest {
|
|||||||
return fakeCustomer;
|
return fakeCustomer;
|
||||||
}
|
}
|
||||||
|
|
||||||
private MemberShare givenFakeMemberShare(Customer customer, ShareAction action, int quantity) {
|
private MemberShare givenFakeMemberShare(Customer customer, MemberShareAction action, int quantity) {
|
||||||
MemberShare share = new MemberShare();
|
MemberShare share = new MemberShare();
|
||||||
share.setCustomer(customer);
|
share.setCustomer(customer);
|
||||||
share.setAction(action);
|
share.setAction(action);
|
||||||
|
Loading…
Reference in New Issue
Block a user