#736 Remove use of service getters and deprecate them
This commit is contained in:
@@ -2,6 +2,7 @@ package fr.xephi.authme.settings;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
import fr.xephi.authme.TestHelper;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.hooks.PluginHooks;
|
||||
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||
import org.bukkit.Location;
|
||||
@@ -11,6 +12,8 @@ import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -23,6 +26,7 @@ import static org.mockito.Mockito.mock;
|
||||
/**
|
||||
* Test for {@link SpawnLoader}.
|
||||
*/
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class SpawnLoaderTest {
|
||||
|
||||
@Rule
|
||||
@@ -48,7 +52,8 @@ public class SpawnLoaderTest {
|
||||
@Test
|
||||
public void shouldSetSpawn() {
|
||||
// given
|
||||
SpawnLoader spawnLoader = new SpawnLoader(testFolder, settings, mock(PluginHooks.class));
|
||||
SpawnLoader spawnLoader =
|
||||
new SpawnLoader(testFolder, settings, mock(PluginHooks.class), mock(DataSource.class));
|
||||
World world = mock(World.class);
|
||||
given(world.getName()).willReturn("new_world");
|
||||
Location newSpawn = new Location(world, 123, 45.0, -67.89);
|
||||
|
||||
Reference in New Issue
Block a user