Package org.threeten.bp

Examples of org.threeten.bp.OffsetDateTime.minusSeconds()


    Instant now = Instant.now(_posMaster.getClock());
   
    OffsetDateTime offsetDateTime = OffsetDateTime.now();
   
    ManageablePosition position = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "C"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(600).toOffsetTime(), ExternalId.of("CPS", "CPV")));
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "D"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(500).toOffsetTime(), ExternalId.of("CPS", "CPV")));
   
    PositionDocument doc = new PositionDocument();
    doc.setPosition(position);
    PositionDocument test = _posMaster.add(doc);
View Full Code Here


   
    OffsetDateTime offsetDateTime = OffsetDateTime.now();
   
    ManageablePosition position = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "C"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(600).toOffsetTime(), ExternalId.of("CPS", "CPV")));
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "D"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(500).toOffsetTime(), ExternalId.of("CPS", "CPV")));
   
    PositionDocument doc = new PositionDocument();
    doc.setPosition(position);
    PositionDocument test = _posMaster.add(doc);
   
View Full Code Here

  public void test_addWithTwoTrades_addThenGet() {
    ManageablePosition position = new ManageablePosition(BigDecimal.valueOf(20), ExternalId.of("A", "B"));
   
    OffsetDateTime offsetDateTime = OffsetDateTime.now();
   
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(600).toOffsetTime(), ExternalId.of("CPS", "CPV")));
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "C"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(500).toOffsetTime(), ExternalId.of("CPS", "CPV")));
   
    PositionDocument doc = new PositionDocument();
    doc.setPosition(position);
    PositionDocument added = _posMaster.add(doc);
View Full Code Here

    ManageablePosition position = new ManageablePosition(BigDecimal.valueOf(20), ExternalId.of("A", "B"));
   
    OffsetDateTime offsetDateTime = OffsetDateTime.now();
   
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(600).toOffsetTime(), ExternalId.of("CPS", "CPV")));
    position.getTrades().add(new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "C"), offsetDateTime.toLocalDate(), offsetDateTime.minusSeconds(500).toOffsetTime(), ExternalId.of("CPS", "CPV")));
   
    PositionDocument doc = new PositionDocument();
    doc.setPosition(position);
    PositionDocument added = _posMaster.add(doc);
    assertNotNull(added);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.