Skip to content

Commit b58e621

Browse files
committed
Remove commented out code
1 parent 3b4163c commit b58e621

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

src/test/java/world/bentobox/level/LevelsManagerTest.java

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ public void setUp() throws Exception {
9898
when(dbSetup.getHandler(any())).thenReturn(handler);
9999
when(addon.getPlugin()).thenReturn(plugin);
100100

101-
// Bukkit
102-
/*
103-
when(Bukkit.getWorld(anyString())).thenReturn(world);
104-
when(Bukkit.getPluginManager()).thenReturn(pim);
105-
when(Bukkit.getPlayer(any(UUID.class))).thenReturn(player);
106-
when(Bukkit.getScheduler()).thenReturn(scheduler);
107-
*/
108-
109101
// The database type has to be created one line before the thenReturn() to work!
110102
DatabaseType value = DatabaseType.JSON;
111103
when(plugin.getSettings()).thenReturn(pluginSettings);
@@ -117,8 +109,6 @@ public void setUp() throws Exception {
117109
when(pipeliner.addIsland(any())).thenReturn(cf);
118110

119111
// Island
120-
//when(addon.getIslands()).thenReturn(im);
121-
//uuid = UUID.randomUUID();
122112
ImmutableSet<UUID> iset = ImmutableSet.of(uuid);
123113
when(island.getMemberSet()).thenReturn(iset);
124114
when(island.getOwner()).thenReturn(uuid);
@@ -160,13 +150,6 @@ public void setUp() throws Exception {
160150
"player9",
161151
"player10"
162152
);
163-
// Mock item factory (for itemstacks)
164-
/*
165-
ItemFactory itemFactory = mock(ItemFactory.class);
166-
when(Bukkit.getItemFactory()).thenReturn(itemFactory);
167-
ItemMeta itemMeta = mock(ItemMeta.class);
168-
when(itemFactory.getItemMeta(any())).thenReturn(itemMeta);
169-
*/
170153
// Has perms
171154
when(player.hasPermission(anyString())).thenReturn(true);
172155
// Make island levels
@@ -212,13 +195,7 @@ public void tearDown() throws Exception {
212195
User.clearUsers();
213196
Mockito.framework().clearInlineMocks();
214197
}
215-
/*
216-
private static void deleteAll(File file) throws IOException {
217-
if (file.exists()) {
218-
Files.walk(file.toPath()).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
219-
}
220-
}
221-
*/
198+
222199
/**
223200
* Test method for
224201
* {@link world.bentobox.level.LevelsManager#calculateLevel(UUID, world.bentobox.bentobox.database.objects.Island)}.
@@ -233,9 +210,6 @@ public void testCalculateLevel() {
233210
cf.complete(results);
234211

235212
assertEquals(10000L, lm.getLevelsData(island).getLevel());
236-
// Map<UUID, Long> tt = lm.getTopTen(world, 10);
237-
// assertEquals(1, tt.size());
238-
// assertTrue(tt.get(uuid) == 10000);
239213
assertEquals(10000L, lm.getIslandMaxLevel(world, uuid));
240214

241215
results.setLevel(5000);

0 commit comments

Comments
 (0)