mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fn: Add test for SkinManagerImpl#getByFile
This commit is contained in:
@@ -185,4 +185,16 @@ public class SkinManagerTest {
|
||||
expect(ex).toBeDefined();
|
||||
expect(ex.getReason()).toBe(SkinLoadException.Reason.INVALID_URL);
|
||||
}
|
||||
|
||||
@FPTest(name = "SkinManagerImpl#getByFile invalid")
|
||||
public void testGetByFileInvalid(Player player) {
|
||||
String filePath = "invalid-file-path-" + System.currentTimeMillis() + ".html";
|
||||
SkinData.SkinVariant variant = SkinData.SkinVariant.SLIM;
|
||||
|
||||
Runnable runnable = () -> manager.getByFile(filePath, variant);
|
||||
SkinLoadException ex = expect(runnable).toThrow(SkinLoadException.class);
|
||||
|
||||
expect(ex).toBeDefined();
|
||||
expect(ex.getReason()).toBe(SkinLoadException.Reason.INVALID_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user