@Test(expectedExceptions = NullPointerException.class) public void testTimeGetterWithNullTimeDimension() { TemporalElement elementMock = mock(TemporalElement.class, withSettings() .useConstructor(GradoopId.get(), null, null, null, null) .defaultAnswer(CALLS_REAL_METHODS)); elementMock.getTimeByDimension(null); }
public Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension) { switch (Objects.requireNonNull(dimension)) { case VALID_TIME: return this.validTime; case TRANSACTION_TIME: return this.transactionTime; default: throw new IllegalArgumentException("Unknown dimension [" + dimension + "]."); } }
TemporalElement extends EPGMElement implements Element { public Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension) { switch (Objects.requireNonNull(dimension)) { case VALID_TIME: return this.validTime; case TRANSACTION_TIME: return this.transactionTime; default: throw new IllegalArgumentException("Unknown dimension [" + dimension + "]."); } } }
TemporalElement extends EPGMElement implements Element { public Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension) { switch (Objects.requireNonNull(dimension)) { case VALID_TIME: return this.validTime; case TRANSACTION_TIME: return this.transactionTime; default: throw new IllegalArgumentException("Unknown dimension [" + dimension + "]."); } } TemporalElement();   TemporalElement(GradoopId id, String label, Properties properties, Long validFrom, Long validTo); }
TemporalElement extends EPGMElement implements Element { public Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension) { switch (Objects.requireNonNull(dimension)) { case VALID_TIME: return this.validTime; case TRANSACTION_TIME: return this.transactionTime; default: throw new IllegalArgumentException("Unknown dimension [" + dimension + "]."); } } 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 Tuple2<Long, Long> getTimeByDimension(TimeDimension dimension) { switch (Objects.requireNonNull(dimension)) { case VALID_TIME: return this.validTime; case TRANSACTION_TIME: return this.transactionTime; default: throw new IllegalArgumentException("Unknown dimension [" + dimension + "]."); } } 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; }