@Test(expectedExceptions = IllegalArgumentException.class) public void testTransactionTimeSetterWithInvalidValues() { TemporalElement elementMock = mock(TemporalElement.class, withSettings() .useConstructor(GradoopId.get(), "", null, null, null) .defaultAnswer(CALLS_REAL_METHODS)); elementMock.setTransactionTime(Tuple2.of(2L, 1L)); }
public void setTransactionTime(Tuple2<Long, Long> transactionTime) { Objects.requireNonNull(transactionTime); Objects.requireNonNull(transactionTime.f0); Objects.requireNonNull(transactionTime.f1); if (transactionTime.f0 > transactionTime.f1) { throw new IllegalArgumentException("tx-from time can not be after tx-to time"); } this.transactionTime = transactionTime; }
TemporalElement extends EPGMElement implements Element { public void setTransactionTime(Tuple2<Long, Long> transactionTime) { Objects.requireNonNull(transactionTime); Objects.requireNonNull(transactionTime.f0); Objects.requireNonNull(transactionTime.f1); if (transactionTime.f0 > transactionTime.f1) { throw new IllegalArgumentException("tx-from time can not be after tx-to time"); } this.transactionTime = transactionTime; } }
TemporalElement extends EPGMElement implements Element { public void setTransactionTime(Tuple2<Long, Long> transactionTime) { Objects.requireNonNull(transactionTime); Objects.requireNonNull(transactionTime.f0); Objects.requireNonNull(transactionTime.f1); if (transactionTime.f0 > transactionTime.f1) { throw new IllegalArgumentException("tx-from time can not be after tx-to time"); } this.transactionTime = transactionTime; } TemporalElement();   TemporalElement(GradoopId id, String label, Properties properties, Long validFrom, Long validTo); }
TemporalElement extends EPGMElement implements Element { public void setTransactionTime(Tuple2<Long, Long> transactionTime) { Objects.requireNonNull(transactionTime); Objects.requireNonNull(transactionTime.f0); Objects.requireNonNull(transactionTime.f1); if (transactionTime.f0 > transactionTime.f1) { throw new IllegalArgumentException("tx-from time can not be after tx-to time"); } this.transactionTime = transactionTime; } TemporalElement();   TemporalElement(GradoopId id, String label, Properties properties, Long validFrom, Long validTo); Tuple2<Long, Long> getTransactionTime(); void setTransactionTime(Tuple2<Long, Long> transactionTime); Tuple2<Long, Long> getValidTime(); void setValidTime(Tuple2<Long, Long> validTime); Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension); Long getValidFrom(); void setValidFrom(long validFrom); Long getValidTo(); void setValidTo(long validTo); Long getTxFrom(); void setTxFrom(long txFrom); Long getTxTo(); void setTxTo(long txTo); @Override String toString(); }
TemporalElement extends EPGMElement implements Element { public void setTransactionTime(Tuple2<Long, Long> transactionTime) { Objects.requireNonNull(transactionTime); Objects.requireNonNull(transactionTime.f0); Objects.requireNonNull(transactionTime.f1); if (transactionTime.f0 > transactionTime.f1) { throw new IllegalArgumentException("tx-from time can not be after tx-to time"); } this.transactionTime = transactionTime; } TemporalElement();   TemporalElement(GradoopId id, String label, Properties properties, Long validFrom, Long validTo); Tuple2<Long, Long> getTransactionTime(); void setTransactionTime(Tuple2<Long, Long> transactionTime); Tuple2<Long, Long> getValidTime(); void setValidTime(Tuple2<Long, Long> validTime); Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension); Long getValidFrom(); void setValidFrom(long validFrom); Long getValidTo(); void setValidTo(long validTo); Long getTxFrom(); void setTxFrom(long txFrom); Long getTxTo(); void setTxTo(long txTo); @Override String toString(); static final Long DEFAULT_TIME_FROM; static final Long DEFAULT_TIME_TO; }