java - Remove NonStrictExpectation which was defined previously -


This is a non-static estimate in my Genius Test case:

  New Non-Street Expectations (mCurrencyDao) {html> 

{Invitation (mCurrencyDao, "Read SQLquire", withAny (String.class)); Result = ReadyTest SQL (PelkinsFortest); Time = 1; }}; MCurrencyDao.loadAll (lToday);

That works very well and leads to expected results. Now I changed my code to:

  New Non-Strike Expectations ( MCurrencyDao) {{invoke (mCurrencyDao, "readSqlQuery", withAny (String.class)); Result = ReadyTest SQL (PelkinsFortest); Time = 1; }}; MCurrencyDao.loadAll (lToday); MCurrencyDao.loadAll (lTomorrow);  

The second call mCurrencyDao.loadAll (lTomorrow); is to be executed without my NonStrictExpectations .

is an easy way to remove my previously defined NonStrictExpectations after calling mCurrencyDao.loadAll (lToday); ?

You use the minkit.Invocation class to apply the basic method Can Deencapsulation.invoke () . The second method is to assign the following code snippets to the original method on orientation.

  New non-stick Exxpectations (mCurrencyDao) {{invoke (mCurrencyDao, "readSqlQuery", withAny (String.class)); Results = new representative & lt; String & gt; () {@SuppressWarnings ("Unused") String Representative (Invitation Mangalization) {If (invocation.getInvocationIndex () == 0) {Preparation of Return TESQQL (PALKFFirst); } And {return invention. Proceed (); }}}; Time = 2; }}; MCurrencyDao.loadAll (lToday); MCurrencyDao.loadAll (lTomorrow);  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -