Skip to content

Commit

Permalink
Fixed test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jan 13, 2016
1 parent 12ea49e commit 42958df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ public void testScaffoldSetup() throws Exception
public void shouldCreateOneErrorPageForEachErrorCode() throws Exception
{
shellTest.execute("servlet-setup --servlet-version 3.1", 10, TimeUnit.SECONDS);
shellTest.execute("jpa-setup", 10, TimeUnit.SECONDS);
shellTest.execute("jpa-new-entity --named Customer", 10, TimeUnit.SECONDS);
shellTest.execute("jpa-new-field --named firstName", 10, TimeUnit.SECONDS);
shellTest.execute("jpa-new-entity --named Publisher", 10, TimeUnit.SECONDS);
shellTest.execute("jpa-new-field --named firstName", 10, TimeUnit.SECONDS);
Assert.assertThat(shellTest.execute("scaffold-setup", 10, TimeUnit.SECONDS),
not(instanceOf(Failed.class)));
Result result = shellTest.execute("scaffold-setup --provider Faces", 10, TimeUnit.SECONDS);
Assert.assertThat(result, not(instanceOf(Failed.class)));
Project project = projectFactory.findProject(shellTest.getShell().getCurrentResource());
Assert.assertTrue(project.hasFacet(ServletFacet_3_1.class));
ServletFacet_3_1 servletFacet = project.getFacet(ServletFacet_3_1.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ public void initializeUI(UIBuilder builder) throws Exception
@Override
public Result execute(final UIExecutionContext context) throws Exception
{
if (cdiVersion.hasValue())
if (facetFactory.install(getSelectedProject(context.getUIContext()), cdiVersion.getValue()))
{
if (facetFactory.install(getSelectedProject(context.getUIContext()), cdiVersion.getValue()))
{
return Results.success("CDI has been installed.");
}
return Results.success("CDI has been installed.");
}
return Results.fail("Could not install CDI.");
}
Expand Down

0 comments on commit 42958df

Please sign in to comment.