ATest.java - Can we verify, when no exception occurred in a testdisplay2() method like we use expected when some exception occurred in testdisplay1()
class A{
public void display(){
...
...
...
if(a){
throw new AIsTrueException("a true");
}
if(b){
throw new BIsTrueException("b true");
}
}
}
class BTest{
...
@InjectMock
A subject;
...
@Test(expected=AIsTrueException.class)
public void testdisplay1(){
subject.display(true,false);
}
@Test
public void testdisplay2(){
subject.display(false,false);
// Here how can I verify that no exception has occured in display(),
// (When exception occured we use expected = ...)
// Do we have similar when no exception occured
}
...
...
}