Search in sources :

Example 1 with FileLocator

use of org.eclipse.core.runtime.FileLocator in project powermock by powermock.

the class PrepareForTestSignedTest method shouldBeAbleMockSignedClasses.

@Test
public void shouldBeAbleMockSignedClasses() {
    FileLocator fileLocator = mock(FileLocator.class);
    mockStatic(SomeClassUseSignedClasses.class);
    when(SomeClassUseSignedClasses.getFileLocator()).thenReturn(fileLocator);
    assertThat(SomeClassUseSignedClasses.getFileLocator()).isNotNull();
}
Also used : FileLocator(org.eclipse.core.runtime.FileLocator) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

FileLocator (org.eclipse.core.runtime.FileLocator)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1