use of com.ichi2.testutils.MutableTime in project Anki-Android by ankidroid.
the class SchedTest method testRevLogValues.
@Test
public void testRevLogValues() {
MutableTime time = new MutableTime(MockTime.timeStamp(2020, 8, 4, 11, 22, 19, 123), 10);
Collection col = CollectionHelper.getInstance().getCol(getTargetContext(), time);
addNoteUsingBasicModel("Hello", "World");
AbstractSched sched = col.getSched();
Card c = sched.getCard();
time.setFrozen(true);
long currentTime = time.getInternalTimeMs();
sched.answerCard(c, BUTTON_ONE);
long timeAnswered = col.getDb().queryLongScalar("select id from revlog");
assertThat(timeAnswered, is(currentTime));
}
Aggregations