Skip to content

Commit

Permalink
Debug time scope parsing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergondza committed Jan 11, 2017
1 parent 59acb91 commit 464fe59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ public String getValue() {
return name + ":" + FORMAT.format(new Date(aliveUntil));
}

public long getAliveUntil() {
return aliveUntil;
}

@Override
protected boolean _equals(ServerScope o) {
Time that = (Time) o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public void parse() throws Exception {
assertEquals(run, ServerScope.parse(run.getValue()));

ServerScope.Time time = (ServerScope.Time) ServerScope.parse("time:2017-01-11T14:09:25.687+0100");
assertEquals(time, ServerScope.parse(time.getValue()));
ServerScope.Time time2 = (ServerScope.Time) ServerScope.parse(time.getValue());
assertEquals(time.getAliveUntil() + " != " + time2.getAliveUntil(), time, time2);
}

@Test
Expand Down

0 comments on commit 464fe59

Please sign in to comment.