import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.greaterThan
import org.hamcrest.Matchers.lessThan
+import java.util.concurrent.TimeUnit.DAYS
import kotlin.test.Test
class ReplyTest {
assertThat(newestReplyFirst.compare(reply1, reply2), equalTo(0))
}
+ @Test
+ fun `noFutureReply filter recognizes reply from the future`() {
+ val futureReply = emptyPostReply(time = System.currentTimeMillis() + DAYS.toMillis(1))
+ assertThat(noFutureReply(futureReply), equalTo(false))
+ }
+
+ @Test
+ fun `noFutureReply filter recognizes reply from the present`() {
+ val futureReply = emptyPostReply(time = System.currentTimeMillis())
+ assertThat(noFutureReply(futureReply), equalTo(true))
+ }
+
}