I have this NonStrictExpectation in my JUnit test case:
new NonStrictExpectations(mCurrencyDao) {
{
invoke(mCurrencyDao, "readSqlQuery", withAny(String.class));
result = prepareTestSQL(pAllKeysForTest);
times = 1;
}
};
mCurrencyDao.loadAll(lToday);
which works pretty fine and leads to the expected result. Now I had changed my code to this:
new NonStrictExpectations(mCurrencyDao) {
{
invoke(mCurrencyDao, "readSqlQuery", withAny(String.class));
result = prepareTestSQL(pAllKeysForTest);
times = 1;
}
};
mCurrencyDao.loadAll(lToday);
mCurrencyDao.loadAll(lTomorrow);
the second call mCurrencyDao.loadAll(lTomorrow);
has to be executed without my NonStrictExpectations
.
Is there an easy way to remove my previous defined NonStrictExpectations
after I called mCurrencyDao.loadAll(lToday);
?