Search in sources :

Example 11 with SuppressField

use of samples.suppressfield.SuppressField in project powermock by powermock.

the class SuppressFieldTest method assertThatSpecificInstanceFinalFieldSuppressionWorks.

@Test
public void assertThatSpecificInstanceFinalFieldSuppressionWorks() throws Exception {
    suppress(field(SuppressField.class, "myWrappedBoolean"));
    SuppressField suppressField = new SuppressField();
    assertNull(suppressField.getMyWrappedBoolean());
}
Also used : SuppressField(samples.suppressfield.SuppressField) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)11 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)11 SuppressField (samples.suppressfield.SuppressField)11 Ignore (org.junit.Ignore)1 SuppressConstructorHierarchy (samples.suppressconstructor.SuppressConstructorHierarchy)1 SuppressMethod (samples.suppressmethod.SuppressMethod)1