|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcomtest.ComTestCpp.ComTestScanner
public static class ComTestCpp.ComTestScanner
Class to do the file scanning and output for test class
Nested Class Summary | |
---|---|
class |
ComTestCpp.ComTestScanner.CommentCodeHandler
Handles to ComTest-comment and returns the position of last handled line. |
Method Summary | |
---|---|
protected void |
addImports()
Add imports-list to outlines Also if doStaticImport is true then add also static import |
void |
checkOptionLine(String line,
boolean all)
Check the selected line by ComTest options |
ComTestCpp.ComTestScanner.CommentCodeHandler |
createCommentCodeHandler()
This factory method is just for testing purposes |
boolean |
findNames(String fileName)
Find outName and className from fileName |
Strings |
getOutlines()
This method is just for testing purposes to return current outlines. |
String |
scan(String fileName)
Scan the contents and make a test class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Strings getOutlines()
public ComTestCpp.ComTestScanner.CommentCodeHandler createCommentCodeHandler()
public boolean findNames(String fileName) throws IOException
fileName
- name to look;
IOException
- when problems with the filepublic void checkOptionLine(String line, boolean all)
line
- what to checkall
- to check all or only partTestHelpper t = new TestHelpper(); t.scanner.checkOptionLine(" * #import imp1; // ", true); t.imports.get(0) === "import imp1;"; t.scanner.checkOptionLine(" * #import imp2; // ", true); t.imports.size() === 1; t.scanner.checkOptionLine(" // #import imp2; // ", true); t.imports.get(1) === "import imp2;"; t.scanner.checkOptionLine(" //#import imp3; // ", true); t.imports.get(2) === "import imp3;"; t.scanner.checkOptionLine(" *#import imp4; // ", true); t.imports.get(3) === "import imp4;"; t.scanner.checkOptionLine(" // #import imp5; // ", true); t.imports.size() === 4;
protected void addImports()
public String scan(String fileName)
fileName
- filename read to contents
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |