extract utility method
a method to send json over tcp can be used by several tests
This commit is contained in:
@@ -105,12 +105,12 @@ public class PlotSettings {
|
||||
|
||||
public OffsetDateTime dateTo() {
|
||||
|
||||
final int period = Integer.parseInt(dateRange.split(" ")[0]);
|
||||
final ChronoUnit unit = toChronoUnit(dateRange.split(" ")[1]);
|
||||
|
||||
if (StringUtils.isEmpty(dateRange)) {
|
||||
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(Long.MAX_VALUE), ZoneOffset.UTC);
|
||||
} else {
|
||||
final int period = Integer.parseInt(dateRange.split(" ")[0]);
|
||||
final ChronoUnit unit = toChronoUnit(dateRange.split(" ")[1]);
|
||||
|
||||
return dateFrom().plus(period, unit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user