use of org.jmock.Expectations in project gradle by gradle.
the class StringJavadocOptionFileOptionTest method testWriteNoneNullValue.
@Test
public void testWriteNoneNullValue() throws IOException {
final String testValue = "testValue";
stringOption.setValue(testValue);
context.checking(new Expectations() {
{
oneOf(writerContextMock).writeValueOption(optionName, testValue);
}
});
stringOption.write(writerContextMock);
}
use of org.jmock.Expectations in project gradle by gradle.
the class StandardJavadocDocletOptionsTest method testConstructor.
@Test
public void testConstructor() {
final JavadocOptionFile optionFileMock = context.mock(JavadocOptionFile.class);
context.checking(new Expectations() {
{
// core options
oneOf(optionFileMock).addStringOption("overview");
oneOf(optionFileMock).addEnumOption("memberLevel");
oneOf(optionFileMock).addStringOption("doclet");
oneOf(optionFileMock).addPathOption("docletclasspath");
oneOf(optionFileMock).addStringOption("source");
oneOf(optionFileMock).addPathOption("sourcepath");
oneOf(optionFileMock).addPathOption("classpath");
oneOf(optionFileMock).addStringsOption("subpackages", ";");
oneOf(optionFileMock).addStringsOption("exclude", ":");
oneOf(optionFileMock).addPathOption("bootclasspath");
oneOf(optionFileMock).addPathOption("extdirs");
oneOf(optionFileMock).addEnumOption("outputLevel", JavadocOutputLevel.QUIET);
oneOf(optionFileMock).addBooleanOption("breakiterator");
oneOf(optionFileMock).addStringOption("locale");
oneOf(optionFileMock).addStringOption("encoding");
// standard doclet options
oneOf(optionFileMock).addFileOption("d");
oneOf(optionFileMock).addBooleanOption("use");
oneOf(optionFileMock).addBooleanOption("version");
oneOf(optionFileMock).addBooleanOption("author");
oneOf(optionFileMock).addBooleanOption("splitindex");
oneOf(optionFileMock).addStringOption("windowtitle");
oneOf(optionFileMock).addStringOption("doctitle");
oneOf(optionFileMock).addStringOption("footer");
oneOf(optionFileMock).addStringOption("bottom");
oneOf(optionFileMock).addStringOption("link");
allowing(optionFileMock).addOption(new LinksOfflineJavadocOptionFileOption("linkoffline", Lists.<JavadocOfflineLink>newArrayList()));
oneOf(optionFileMock).addBooleanOption("linksource");
oneOf(optionFileMock).addOption(new GroupsJavadocOptionFileOption("group", Maps.<String, List<String>>newLinkedHashMap()));
oneOf(optionFileMock).addBooleanOption("nodeprecated");
oneOf(optionFileMock).addBooleanOption("nodeprecatedlist");
oneOf(optionFileMock).addBooleanOption("nosince");
oneOf(optionFileMock).addBooleanOption("notree");
oneOf(optionFileMock).addBooleanOption("noindex");
oneOf(optionFileMock).addBooleanOption("nohelp");
oneOf(optionFileMock).addBooleanOption("nonavbar");
oneOf(optionFileMock).addFileOption("helpfile");
oneOf(optionFileMock).addFileOption("stylesheetfile");
oneOf(optionFileMock).addBooleanOption("serialwarn");
oneOf(optionFileMock).addStringOption("charset");
oneOf(optionFileMock).addStringOption("docencoding");
oneOf(optionFileMock).addBooleanOption("keywords");
oneOf(optionFileMock).addStringOption("tags");
oneOf(optionFileMock).addStringOption("taglets");
oneOf(optionFileMock).addPathOption("tagletpath");
oneOf(optionFileMock).addBooleanOption("docfilessubdirs");
oneOf(optionFileMock).addStringsOption("excludedocfilessubdir", ":");
oneOf(optionFileMock).addStringsOption("noqualifier", ":");
oneOf(optionFileMock).addBooleanOption("notimestamp");
oneOf(optionFileMock).addBooleanOption("nocomment");
}
});
options = new StandardJavadocDocletOptions();
}
use of org.jmock.Expectations in project gradle by gradle.
the class BooleanJavadocOptionFileOptionTest method testWriteTrueValue.
@Test
public void testWriteTrueValue() throws IOException {
booleanOption.setValue(true);
context.checking(new Expectations() {
{
oneOf(writerContextMock).writeOption(optionName);
}
});
booleanOption.write(writerContextMock);
}
use of org.jmock.Expectations in project gradle by gradle.
the class EnumJavadocOptionFileOptionTest method testWriteNoneNullValue.
@Test
public void testWriteNoneNullValue() throws IOException {
enumOption.setValue(JavadocMemberLevel.PUBLIC);
context.checking(new Expectations() {
{
oneOf(writerContextMock).writeOption("public");
}
});
enumOption.write(writerContextMock);
}
use of org.jmock.Expectations in project gradle by gradle.
the class MultilineStringsJavadocOptionFileOptionTest method writeNonNullValue.
@Test
public void writeNonNullValue() throws IOException {
final String extDocUrl = "extDocUrl";
linksOption.getValue().add(extDocUrl);
context.checking(new Expectations() {
{
final List<String> tempList = new ArrayList<String>();
tempList.add(extDocUrl);
oneOf(writerContextMock).writeMultilineValuesOption(optionName, tempList);
}
});
linksOption.writeCollectionValue(writerContextMock);
}
Aggregations