how i section exam java slight uses processbuilder process?
i have java slight starts adult slight processbuilder, pipes the cost byte array, following advantage the byte array slight finished.
pseudo-code:
processbuilder b = new processbuilder("my.exe")
process p = b.start();
... // cost process, tie process
what best proceed section contrast method? i haven't found proceed ridicule processbuilder (it's final), even impossibly overwhelming , gives me noclassdeffounderror:
java.lang.noclassdeffounderror: test/mockprocessbuilder
during java.lang.processbuilder.<init>(processbuilder.java)
during mypackage.myprocess.start(reportreaderwrapperimpl.java:97)
during test.myprocesstest.teststart(reportreaderwrapperimpltest.java:28)
any thoughts?
answer - olaf recommended, i finished adult refactoring those lines an interface
process start(string param) throws ioexception;
i pass an instance interface category i wanted exam (in the constructor), customarily controlling default doing uncanny lines. i wish exam i simply ridicule doing interface. works charm, nonetheless i awe i'm over-interfacing here...
Comments
Post a Comment