Search in sources :

Example 1 with IndicateReloadClass

use of org.powermock.core.IndicateReloadClass in project Bukkit_Bungee_PluginLib by GeorgH93.

the class JenkinsUpdateProviderTest method testSettings.

@Test
public void testSettings() throws IllegalAccessException, InvocationTargetException, InstantiationException {
    // noinspection ConstantConditions
    JenkinsUpdateProvider updater = new JenkinsUpdateProvider("https://ci.pcgamingfreaks.at", "PluginLib", null);
    assertTrue("The JenkinsUpdateProvider should provide a download URL", updater.provideDownloadURL());
    assertTrue("The JenkinsUpdateProvider should provide a changelog", updater.provideChangelog());
    assertTrue("The JenkinsUpdateProvider should provide a checksum", updater.provideMD5Checksum());
    updater = (JenkinsUpdateProvider) JenkinsUpdateProvider.class.getDeclaredConstructors()[0].newInstance(new IndicateReloadClass());
    assertFalse("The JenkinsUpdateProvider should not provide a Minecraft version", updater.provideMinecraftVersion());
    assertFalse("The JenkinsUpdateProvider should not provide a update history", updater.provideUpdateHistory());
    assertFalse("The JenkinsUpdateProvider should not provide dependencies", updater.provideDependencies());
}
Also used : IndicateReloadClass(org.powermock.core.IndicateReloadClass) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

Test (org.junit.Test)1 IndicateReloadClass (org.powermock.core.IndicateReloadClass)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1