Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Handle source and classpath directory #19

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

BenNzewi
Copy link
Collaborator

@BenNzewi BenNzewi commented Jul 6, 2018

No description provided.

@coveralls
Copy link

coveralls commented Jul 6, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling bf9afda on handle-source-and-classpath-dir into 9c53223 on master.

@BenNzewi BenNzewi force-pushed the handle-source-and-classpath-dir branch from bdf01e0 to 5853e8a Compare July 9, 2018 08:39


public void testShouldIncludeRamlFilesWhenSourcePathOrClassPathSpecified() throws Exception {
File pom = getTestFile("src/test/resources/generate-using-source-and-classpath/pom.xml");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be final

public void testShouldIncludeRamlFilesWhenSourcePathOrClassPathSpecified() throws Exception {
File pom = getTestFile("src/test/resources/generate-using-source-and-classpath/pom.xml");

GenerateMojo mojo = (GenerateMojo) lookupConfiguredMojo(pom, "generate");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final

GenerateMojo mojo = (GenerateMojo) lookupConfiguredMojo(pom, "generate");

mojo.execute();
List<Pair<Raml, GeneratorConfig>> capturedGeneratorArgs = DummyGeneratorCaptor.getInstance().capturedArgs();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final


assertThat(capturedGeneratorArgs.size(), greaterThan(5));

Raml raml = capturedGeneratorArgs.get(0).getLeft();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final

Raml raml = capturedGeneratorArgs.get(0).getLeft();
assertThat(raml.getTitle(), equalTo("example.raml"));

Path expectedSourceDirectory = Paths.get(project.getBasedir().toString(), "src", "raml");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final and more below.....

<skip.schema.pojo.generation>true</skip.schema.pojo.generation>
<skip.schema.event.pojo.generation>true</skip.schema.event.pojo.generation>
<useSourcePathAndClassPath>true</useSourcePathAndClassPath>
<useClassPath>false</useClassPath>-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this commented section be removed?

private boolean useSourcePathAndClassPath = false;

@Parameter(property = "useClassPath", defaultValue = "false")
private boolean useClassPath = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be an enumeration rather than two booleans?

@BenNzewi BenNzewi force-pushed the handle-source-and-classpath-dir branch 9 times, most recently from f174900 to 22e0a80 Compare July 11, 2018 11:51
@BenNzewi BenNzewi force-pushed the handle-source-and-classpath-dir branch from 22e0a80 to bf9afda Compare July 11, 2018 11:53
@mapingo mapingo merged commit 24f42e4 into master Jul 11, 2018
@mapingo mapingo deleted the handle-source-and-classpath-dir branch July 11, 2018 12:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants