mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 15:44:49 +08:00
Fixed Tests
This commit is contained in:
parent
6981b222af
commit
bcca0a7950
@ -127,11 +127,13 @@ public class UserInfoTable extends UserIDTable {
|
||||
public Map<UUID, UserInfo> getAllUserInfo(UUID uuid) throws SQLException {
|
||||
String usersIDColumn = usersTable + "." + usersTable.getColumnID();
|
||||
String serverIDColumn = serverTable + "." + serverTable.getColumnID();
|
||||
String usersNameColumn = usersTable + "." + usersTable.getColumnName() + " as name";
|
||||
String serverUUIDColumn = serverTable + "." + serverTable.getColumnUUID() + " as s_uuid";
|
||||
String sql = "SELECT " +
|
||||
tableName + "." + columnRegistered + ", " +
|
||||
columnBanned + ", " +
|
||||
columnOP + ", " +
|
||||
usersNameColumn + ", " +
|
||||
serverUUIDColumn +
|
||||
" FROM " + tableName +
|
||||
" JOIN " + usersTable + " on " + usersIDColumn + "=" + columnUserID +
|
||||
|
@ -428,11 +428,11 @@ public class DatabaseTest {
|
||||
System.out.println(" " + entry.getValue());
|
||||
}
|
||||
|
||||
List<Session> savedSessions = sessions.get("ServerName");
|
||||
List<Session> savedSessions = sessions.get(Plan.getServerUUID());
|
||||
|
||||
assertNotNull(savedSessions);
|
||||
assertEquals(1, savedSessions.size());
|
||||
assertNull(sessions.get(worlds.get(1)));
|
||||
assertNull(sessions.get(UUID.randomUUID()));
|
||||
|
||||
assertEquals(session, savedSessions.get(0));
|
||||
|
||||
|
@ -100,10 +100,10 @@ public class TestInit {
|
||||
// Files
|
||||
File config = new File(getClass().getResource("/config.yml").getPath());
|
||||
when(planMock.getResource("config.yml")).thenReturn(new FileInputStream(config));
|
||||
File analysis = new File(getClass().getResource("/server.html").getPath());
|
||||
when(planMock.getResource("server.html")).thenReturn(new FileInputStream(analysis));
|
||||
File player = new File(getClass().getResource("/player.html").getPath());
|
||||
when(planMock.getResource("player.html")).thenReturn(new FileInputStream(player));
|
||||
File analysis = new File(getClass().getResource("/web/server.html").getPath());
|
||||
when(planMock.getResource("/web/server.html")).thenReturn(new FileInputStream(analysis));
|
||||
File player = new File(getClass().getResource("/web/player.html").getPath());
|
||||
when(planMock.getResource("/web/player.html")).thenReturn(new FileInputStream(player));
|
||||
|
||||
File tempConfigFile = new File(planMock.getDataFolder(), "config.yml");
|
||||
Config iConfig = new Config(tempConfigFile, FileUtil.lines(planMock, "config.yml")) {
|
||||
|
Loading…
Reference in New Issue
Block a user