()
| 151 | } |
| 152 | |
| 153 | @Test |
| 154 | public void timestampComparison() { |
| 155 | long now = DateTime.currentTimeMillis() / 1000L; |
| 156 | assertFalse(QueryUtil.isTimestampAfter(now*1000, now+1)); |
| 157 | assertFalse(QueryUtil.isTimestampAfter(now-1, now*1000L)); |
| 158 | assertFalse(QueryUtil.isTimestampAfter(now-1, now)); |
| 159 | assertFalse(QueryUtil.isTimestampAfter((now-1)*1000L, now*1000L)); |
| 160 | |
| 161 | assertTrue(QueryUtil.isTimestampAfter(now+1, now*1000L)); |
| 162 | assertTrue(QueryUtil.isTimestampAfter(now*1000L, now-1)); |
| 163 | assertTrue(QueryUtil.isTimestampAfter(now, now-1)); |
| 164 | assertTrue(QueryUtil.isTimestampAfter(now*1000L, (now-1)*1000L)); |
| 165 | |
| 166 | assertFalse(QueryUtil.isTimestampAfter(now, now)); |
| 167 | } |
| 168 | } |
nothing calls this directly
no test coverage detected