use of samples.suppressmethod.SuppressMethod in project powermock by powermock.
the class SuppressMethodTest method testSuppressMultipleMethods.
@Test
public void testSuppressMultipleMethods() throws Exception {
suppress(methods(SuppressMethod.class, "getObject", "getShort"));
SuppressMethod tested = new SuppressMethod();
assertNull("A method returning Object should return null after suppressing method code.", tested.getObject());
assertEquals("A method returning a short should return 0 after suppressing method code.", 0, tested.getShort());
}
use of samples.suppressmethod.SuppressMethod in project powermock by powermock.
the class SuppressMethodTest method testGetLong.
@Test
public void testGetLong() throws Exception {
suppress(method(SuppressMethod.class, "getLong"));
SuppressMethod tested = new SuppressMethod();
assertEquals("A method returning a long should return 0 after suppressing method code.", 0, tested.getLong());
}
use of samples.suppressmethod.SuppressMethod in project powermock by powermock.
the class SuppressMethodTest method testGetShort.
@Test
public void testGetShort() throws Exception {
suppress(method(SuppressMethod.class, "getShort"));
SuppressMethod tested = new SuppressMethod();
assertEquals("A method returning a short should return 0 after suppressing method code.", 0, tested.getShort());
}
use of samples.suppressmethod.SuppressMethod in project powermock by powermock.
the class SuppressMethodTest method testGetObject.
@Test
public void testGetObject() throws Exception {
suppress(method(SuppressMethod.class, "getObject"));
SuppressMethod tested = new SuppressMethod();
assertNull("A method returning Object should return null after suppressing method code.", tested.getObject());
}
Aggregations