Ignore:
Timestamp:
08/02/19 13:39:17 (5 years ago)
Author:
pharms
Message:

made plugin command loading work with Java 11 (hopefully) :-)

Location:
trunk/java-utils-test/src/test/java/de/ugoe/cs/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-utils-test/src/test/java/de/ugoe/cs/util/StopWatchTest.java

    r1484 r2281  
    3636        stopWatch.stop(id); 
    3737         
    38         assertTrue((95 < stopWatch.getDuration(id)) && (stopWatch.getDuration(id) < 105)); 
     38        assertTrue((90 < stopWatch.getDuration(id)) && (stopWatch.getDuration(id) < 110)); 
    3939    } 
    4040 
  • trunk/java-utils-test/src/test/java/de/ugoe/cs/util/console/CommandExecuterTest.java

    r1361 r2281  
    3434                CommandExecuter fixture = CommandExecuter.getInstance(); 
    3535 
    36                 fixture.addCommandPackage(""); 
     36                fixture.addCommandPackage("", this.getClass().getClassLoader()); 
    3737        } 
    3838 
     
    4242                CommandExecuter fixture = CommandExecuter.getInstance(); 
    4343                 
    44                 fixture.addCommandPackage(null); 
     44                fixture.addCommandPackage(null, this.getClass().getClassLoader()); 
    4545        } 
    4646 
     
    5151                MockOutputListener mockListener = new MockOutputListener(); 
    5252                Console.getInstance().registerOutputListener(mockListener); 
    53                 fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands"); 
     53                fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands", this.getClass().getClassLoader()); 
    5454                String command = "mockCommand"; 
    5555                String expected = "mock command: run" + System.getProperty("line.separator"); 
     
    6666                MockOutputListener mockListener = new MockOutputListener(); 
    6767                Console.getInstance().registerOutputListener(mockListener); 
    68                 fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands"); 
     68                fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands", this.getClass().getClassLoader()); 
    6969                String command = "mockCommand param1"; 
    7070                String expected = "Usage: mock command: help" + System.getProperty("line.separator"); 
     
    8181                MockOutputListener mockListener = new MockOutputListener(); 
    8282                Console.getInstance().registerOutputListener(mockListener); 
    83                 fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands"); 
     83                fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands", this.getClass().getClassLoader()); 
    8484                String command = "mockCommand param1 param2"; 
    8585 
     
    9393                MockOutputListener mockListener = new MockOutputListener(); 
    9494                Console.getInstance().registerOutputListener(mockListener); 
    95                 fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands"); 
     95                fixture.addCommandPackage("de.ugoe.cs.util.console.mock.commands", this.getClass().getClassLoader()); 
    9696                String command = "mockCommandddd"; 
    9797                String expected = "Unknown command" + System.getProperty("line.separator"); 
  • trunk/java-utils-test/src/test/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommandsTest.java

    r927 r2281  
    4040    @Test 
    4141    public void test() { 
    42         CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.util.console.defaultcommands"); 
     42        CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.util.console.defaultcommands", this.getClass().getClassLoader()); 
    4343        CMDlistCommands command = new CMDlistCommands(); 
    4444        command.run(null); 
Note: See TracChangeset for help on using the changeset viewer.