mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-20 15:47:38 +01:00
Fix AuthMe initialization test after update to 1.11
This commit is contained in:
parent
2fbf8b6c71
commit
a196420eca
@ -85,8 +85,7 @@ public class AuthMe extends JavaPlugin {
|
||||
*/
|
||||
@VisibleForTesting
|
||||
@SuppressWarnings("deprecation") // the super constructor is deprecated to mark it for unit testing only
|
||||
protected AuthMe(final JavaPluginLoader loader, final Server server, final PluginDescriptionFile description,
|
||||
final File dataFolder, final File file) {
|
||||
protected AuthMe(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file) {
|
||||
super(loader, description, dataFolder, file);
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,6 @@ import static org.mockito.Mockito.mock;
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class AuthMeInitializationTest {
|
||||
|
||||
@Mock
|
||||
private JavaPluginLoader pluginLoader;
|
||||
|
||||
@Mock
|
||||
private Server server;
|
||||
|
||||
@ -60,7 +57,6 @@ public class AuthMeInitializationTest {
|
||||
|
||||
private AuthMe authMe;
|
||||
private File dataFolder;
|
||||
private File settingsFile;
|
||||
|
||||
@Rule
|
||||
public TemporaryFolder temporaryFolder = new TemporaryFolder();
|
||||
@ -73,7 +69,8 @@ public class AuthMeInitializationTest {
|
||||
@Before
|
||||
public void initAuthMe() throws IOException {
|
||||
dataFolder = temporaryFolder.newFolder();
|
||||
settingsFile = new File(dataFolder, "config.yml");
|
||||
File settingsFile = new File(dataFolder, "config.yml");
|
||||
JavaPluginLoader pluginLoader = new JavaPluginLoader(server);
|
||||
Files.copy(TestHelper.getJarFile(TestHelper.PROJECT_ROOT + "config.test.yml"), settingsFile);
|
||||
|
||||
// Mock / wire various Bukkit components
|
||||
@ -86,7 +83,7 @@ public class AuthMeInitializationTest {
|
||||
"AuthMe", "N/A", AuthMe.class.getCanonicalName());
|
||||
|
||||
// Initialize AuthMe
|
||||
authMe = new AuthMe(pluginLoader, server, descriptionFile, dataFolder, null);
|
||||
authMe = new AuthMe(pluginLoader, descriptionFile, dataFolder, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user