mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-28 00:40:05 +02:00
Actually fix stuff and not break it
This commit is contained in:
@@ -39,7 +39,7 @@ public class EconomyTest extends EssentialsTest
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
assertTrue("Player exists", ess.getEconomy().playerExists(PLAYERNAME));
|
assertTrue("Player exists (1)", ess.getEconomy().playerExists(PLAYERNAME));
|
||||||
ess.getEconomy().resetBalance(PLAYERNAME);
|
ess.getEconomy().resetBalance(PLAYERNAME);
|
||||||
assertEquals("Player has no money", 0.0, ess.getEconomy().getMoney(PLAYERNAME));
|
assertEquals("Player has no money", 0.0, ess.getEconomy().getMoney(PLAYERNAME));
|
||||||
ess.getEconomy().setMoney(PLAYERNAME, 10.0);
|
ess.getEconomy().setMoney(PLAYERNAME, 10.0);
|
||||||
@@ -65,7 +65,7 @@ public class EconomyTest extends EssentialsTest
|
|||||||
//test Exceptions
|
//test Exceptions
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
assertTrue("Player exists", ess.getEconomy().playerExists(PLAYERNAME));
|
assertTrue("Player exists (2)", ess.getEconomy().playerExists(PLAYERNAME));
|
||||||
ess.getEconomy().resetBalance(PLAYERNAME);
|
ess.getEconomy().resetBalance(PLAYERNAME);
|
||||||
assertEquals("Reset balance", 0.0, ess.getEconomy().getMoney(PLAYERNAME));
|
assertEquals("Reset balance", 0.0, ess.getEconomy().getMoney(PLAYERNAME));
|
||||||
ess.getEconomy().setMoney(PLAYERNAME, -5.0);
|
ess.getEconomy().setMoney(PLAYERNAME, -5.0);
|
||||||
|
@@ -28,7 +28,7 @@ public abstract class EssentialsTest extends TestCase
|
|||||||
protected final IPlugin plugin;
|
protected final IPlugin plugin;
|
||||||
protected final World world;
|
protected final World world;
|
||||||
protected final Logger logger;
|
protected final Logger logger;
|
||||||
protected final Essentials ess;
|
protected Essentials ess;
|
||||||
protected final List<Player> playerList;
|
protected final List<Player> playerList;
|
||||||
private File folder;
|
private File folder;
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ public abstract class EssentialsTest extends TestCase
|
|||||||
folder = new File(folder, "Essentials-" + System.currentTimeMillis());
|
folder = new File(folder, "Essentials-" + System.currentTimeMillis());
|
||||||
when(plugin.getDataFolder()).thenReturn(folder);
|
when(plugin.getDataFolder()).thenReturn(folder);
|
||||||
when(world.getName()).thenReturn("world");
|
when(world.getName()).thenReturn("world");
|
||||||
ess = new Essentials(server, logger, plugin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createFolder()
|
protected void createFolder()
|
||||||
@@ -115,6 +115,7 @@ public abstract class EssentialsTest extends TestCase
|
|||||||
super.setUp();
|
super.setUp();
|
||||||
createFolder();
|
createFolder();
|
||||||
|
|
||||||
|
ess = new Essentials(server, logger, plugin);
|
||||||
ess.getI18n().updateLocale("en_US");
|
ess.getI18n().updateLocale("en_US");
|
||||||
Essentials.testing = true;
|
Essentials.testing = true;
|
||||||
ess.onEnable();
|
ess.onEnable();
|
||||||
|
@@ -5,14 +5,14 @@ import net.ess3.api.IUser;
|
|||||||
|
|
||||||
public class UserTest extends EssentialsTest
|
public class UserTest extends EssentialsTest
|
||||||
{
|
{
|
||||||
private final IUser base1;
|
//private final IUser base1;
|
||||||
|
|
||||||
public UserTest(String testName)
|
public UserTest(String testName)
|
||||||
{
|
{
|
||||||
super(testName);
|
super(testName);
|
||||||
|
|
||||||
addPlayer("testPlayer1");
|
addPlayer("testPlayer1");
|
||||||
base1 = ess.getUserMap().getUser("testPlayer1");
|
//base1 = ess.getUserMap().getUser("testPlayer1");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void should(String what) //TODO: unused/implement this?
|
private void should(String what) //TODO: unused/implement this?
|
||||||
|
Reference in New Issue
Block a user