Сделал выравнивание.
This commit is contained in:
parent
1c32803b60
commit
542b8c7e58
2 changed files with 14 additions and 11 deletions
|
|
@ -26,9 +26,11 @@ public class ListingBuilder {
|
||||||
public static ListingBuilder builder() {
|
public static ListingBuilder builder() {
|
||||||
return new ListingBuilder();
|
return new ListingBuilder();
|
||||||
}
|
}
|
||||||
private ListingBuilder(){}
|
|
||||||
|
|
||||||
public ListingBuilder append(MoneyMarketSecurity mms){
|
private ListingBuilder() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListingBuilder append(MoneyMarketSecurity mms) {
|
||||||
this.created = mms.getCreated();
|
this.created = mms.getCreated();
|
||||||
this.securityId = mms.getId();
|
this.securityId = mms.getId();
|
||||||
this.symbolCode = mms.getSecuritySymbol();
|
this.symbolCode = mms.getSecuritySymbol();
|
||||||
|
|
@ -37,12 +39,12 @@ public class ListingBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListingBuilder append(MoneyMarketSecurityNewRequest mmsReq){
|
public ListingBuilder append(MoneyMarketSecurityNewRequest mmsReq) {
|
||||||
this.lotSize = mmsReq.getLotSize();
|
this.lotSize = mmsReq.getLotSize();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListingBuilder append(EquitySecurity equitySecurity){
|
public ListingBuilder append(EquitySecurity equitySecurity) {
|
||||||
this.created = equitySecurity.getCreated();
|
this.created = equitySecurity.getCreated();
|
||||||
this.securityId = equitySecurity.getId();
|
this.securityId = equitySecurity.getId();
|
||||||
this.symbolCode = equitySecurity.getSecuritySymbol();
|
this.symbolCode = equitySecurity.getSecuritySymbol();
|
||||||
|
|
@ -50,12 +52,12 @@ public class ListingBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListingBuilder append(EquitySecurityNewRequest request){
|
public ListingBuilder append(EquitySecurityNewRequest request) {
|
||||||
this.lotSize = request.getLotSize();
|
this.lotSize = request.getLotSize();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListingBuilder append(FixedIncomeSecurity fixedIncomeSecurity){
|
public ListingBuilder append(FixedIncomeSecurity fixedIncomeSecurity) {
|
||||||
this.created = fixedIncomeSecurity.getCreated();
|
this.created = fixedIncomeSecurity.getCreated();
|
||||||
this.securityId = fixedIncomeSecurity.getId();
|
this.securityId = fixedIncomeSecurity.getId();
|
||||||
this.symbolCode = fixedIncomeSecurity.getSecuritySymbol();
|
this.symbolCode = fixedIncomeSecurity.getSecuritySymbol();
|
||||||
|
|
@ -64,12 +66,12 @@ public class ListingBuilder {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListingBuilder append(FixedIncomeSecurityNewRequest request){
|
public ListingBuilder append(FixedIncomeSecurityNewRequest request) {
|
||||||
this.lotSize = request.getLotSize();
|
this.lotSize = request.getLotSize();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Listing build(){
|
public Listing build() {
|
||||||
Listing listing = new Listing();
|
Listing listing = new Listing();
|
||||||
listing.setCreated(this.created);
|
listing.setCreated(this.created);
|
||||||
listing.setSecurityId(this.securityId);
|
listing.setSecurityId(this.securityId);
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,14 @@ import java.util.Map;
|
||||||
import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator;
|
import static ru.spcex.clearing.test.MatcherFactory.usingIgnoringFieldsComparator;
|
||||||
import static ru.spcex.clearing.test.TestUtils.*;
|
import static ru.spcex.clearing.test.TestUtils.*;
|
||||||
|
|
||||||
public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{
|
public class MoneyMarketSecurityServiceTest extends AbstractServiceTest {
|
||||||
private static final MatcherFactory.Matcher<MoneyMarketSecurity> MONEY_MARKET_SECURITY_MATCHER = usingIgnoringFieldsComparator("created", "updated");
|
private static final MatcherFactory.Matcher<MoneyMarketSecurity> MONEY_MARKET_SECURITY_MATCHER = usingIgnoringFieldsComparator("created", "updated");
|
||||||
private final long ID = currentId.getAndIncrement();
|
private final long ID = currentId.getAndIncrement();
|
||||||
private final int PARTITION = 0;
|
private final int PARTITION = 0;
|
||||||
private MoneyMarketSecurityFactory moneyMarketSecurityFactory;
|
private MoneyMarketSecurityFactory moneyMarketSecurityFactory;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MoneyMarketSecurityService moneyMarketSecurityService;
|
private MoneyMarketSecurityService moneyMarketSecurityService;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
protected void init() {
|
protected void init() {
|
||||||
super.init();
|
super.init();
|
||||||
|
|
@ -57,7 +58,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{
|
||||||
* {@link MoneyMarketSecurityNewRequest#fullName} - "estat"<br>
|
* {@link MoneyMarketSecurityNewRequest#fullName} - "estat"<br>
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testNewMoneyMarketSecurity(){
|
public void testNewMoneyMarketSecurity() {
|
||||||
clearAllInImdg(moneyMarketSecurityMap);
|
clearAllInImdg(moneyMarketSecurityMap);
|
||||||
final String TOPIC = Consts.DESTINATION_MONEY_MARKET_SECURITY_NEW;
|
final String TOPIC = Consts.DESTINATION_MONEY_MARKET_SECURITY_NEW;
|
||||||
|
|
||||||
|
|
@ -94,7 +95,7 @@ public class MoneyMarketSecurityServiceTest extends AbstractServiceTest{
|
||||||
* {@link CommonDeleteRequest#id} - Идентификатор записи<br>
|
* {@link CommonDeleteRequest#id} - Идентификатор записи<br>
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteMoneyMarket(){
|
public void testDeleteMoneyMarket() {
|
||||||
clearAllInImdg(moneyMarketSecurityMap);
|
clearAllInImdg(moneyMarketSecurityMap);
|
||||||
final String TOPIC = Consts.DESTINATION_MONEY_MARKET_SECURITY_DELETE;
|
final String TOPIC = Consts.DESTINATION_MONEY_MARKET_SECURITY_DELETE;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue