-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove useless documentation related files and Javadocs
- Loading branch information
Jiaqi Guo
committed
Jan 16, 2019
1 parent
a4ad073
commit 3854b3b
Showing
10 changed files
with
9 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,12 @@ | |
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder; | ||
import org.cyclopsgroup.jcli.annotation.Argument; | ||
import org.cyclopsgroup.jcli.annotation.Cli; | ||
import org.cyclopsgroup.jcli.annotation.MultiValue; | ||
import org.cyclopsgroup.jcli.annotation.Option; | ||
|
||
/** | ||
* Example bean for testing purpose | ||
* | ||
* @author <a href="mailto:[email protected]">Jiaqi Guo</a> | ||
*/ | ||
@Cli(name = "sample", description = "A test") | ||
public class Simple implements AutoCompletable { | ||
public List<String> suggestArgument(String partialArgument) { | ||
|
@@ -48,76 +42,46 @@ public List<String> suggestOption(String optionName, String partialOption) { | |
|
||
private List<String> values; | ||
|
||
/** | ||
* @return An integer option | ||
*/ | ||
public final int getIntField() { | ||
return intField; | ||
} | ||
|
||
/** | ||
* @return One string option | ||
*/ | ||
public final String getStringField1() { | ||
return stringField1; | ||
} | ||
|
||
/** | ||
* @return Another string option | ||
*/ | ||
public final String getStringField2() { | ||
return stringField2; | ||
} | ||
|
||
/** | ||
* @return Arguments | ||
*/ | ||
public final List<String> getValues() { | ||
return values; | ||
} | ||
|
||
/** | ||
* @return Boolean flag | ||
*/ | ||
public final boolean isBooleanField() { | ||
return booleanField; | ||
} | ||
|
||
/** | ||
* @param booleanField A flag option | ||
*/ | ||
@Option(name = "b", longName = "boolean", description = "Test boolean field") | ||
public final void setBooleanField(boolean booleanField) { | ||
this.booleanField = booleanField; | ||
} | ||
|
||
/** | ||
* @param intField An integer option | ||
*/ | ||
@Option(name = "i", longName = "tint", description = "Test int value") | ||
public final void setIntField(int intField) { | ||
this.intField = intField; | ||
} | ||
|
||
/** | ||
* @param stringField1 One string option | ||
*/ | ||
@Option(name = "f", longName = "field1", required = true) | ||
public final void setStringField1(String stringField1) { | ||
this.stringField1 = stringField1; | ||
} | ||
|
||
/** | ||
* @param stringField2 Another string option | ||
*/ | ||
@Option(name = "2", longName = "field2") | ||
public final void setStringField2(String stringFIeld2) { | ||
this.stringField2 = stringFIeld2; | ||
} | ||
|
||
/** | ||
* @param values Arguments | ||
*/ | ||
@MultiValue(listType = ArrayList.class) | ||
@Argument | ||
public final void setValues(List<String> values) { | ||
|
15 changes: 0 additions & 15 deletions
15
src/test/java/org/cyclopsgroup/jcli/jline/ArgumentsInspectorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,20 @@ | ||
package org.cyclopsgroup.jcli.jline; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import java.beans.IntrospectionException; | ||
|
||
import org.cyclopsgroup.jcli.ArgumentProcessor; | ||
import org.cyclopsgroup.jcli.Simple; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test case of {@link ArgumentsInspector} | ||
* | ||
* @author <a href="mailto:[email protected]">Jiaqi Guo</a> | ||
*/ | ||
public class ArgumentsInspectorTest { | ||
private ArgumentsInspector ins; | ||
|
||
/** | ||
* Setup object to test | ||
* | ||
* @throws IntrospectionException | ||
*/ | ||
@Before | ||
public void setUp() throws IntrospectionException { | ||
ins = new ArgumentsInspector(ArgumentProcessor.forType(Simple.class).createParsingContext()); | ||
} | ||
|
||
/** | ||
* Test state change of a sevies of argument consumption | ||
*/ | ||
@Test | ||
public void testConsume() { | ||
assertEquals(ArgumentsInspectorState.READY, ins.getState()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,9 @@ | |
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.junit.Assert.assertThat; | ||
|
||
import java.beans.IntrospectionException; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.cyclopsgroup.caff.token.QuotedValueTokenizer; | ||
import org.cyclopsgroup.jcli.Simple; | ||
import org.jline.reader.Candidate; | ||
|
@@ -17,11 +15,6 @@ | |
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test case for {@link CliCompletor} | ||
* | ||
* @author <a href="mailto:[email protected]">Jiaqi Guo</a> | ||
*/ | ||
public class CliCompletorTest { | ||
private List<Candidate> candidates; | ||
|
||
|
@@ -33,11 +26,6 @@ public class CliCompletorTest { | |
|
||
private ParsedLine parsedLine; | ||
|
||
/** | ||
* Set up completor to test | ||
* | ||
* @throws IntrospectionException | ||
*/ | ||
@Before | ||
public void setUp() throws IntrospectionException { | ||
cc = new CliCompletor(new Simple(), new QuotedValueTokenizer()); | ||
|
@@ -47,9 +35,6 @@ public void setUp() throws IntrospectionException { | |
parsedLine = context.mock(ParsedLine.class); | ||
} | ||
|
||
/** | ||
* @throws IntrospectionException | ||
*/ | ||
@Test | ||
public void testCompleteWithEmpty() throws IntrospectionException { | ||
context.checking(new Expectations() { | ||
|