Skip to content

Commit

Permalink
Added getters for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jan 28, 2013
1 parent 788c804 commit 1f8e3dc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Expand Up @@ -108,4 +108,24 @@ public Result execute(UIContext context) throws Exception

return Results.success("New project has been created.");
}

public UIInput<String> getNamed()
{
return named;
}

public UIInput<DirectoryResource> getTargetLocation()
{
return targetLocation;
}

public UIInput<Boolean> getOverwrite()
{
return overwrite;
}

public UIInput<ProjectType> getType()
{
return type;
}
}
Expand Up @@ -103,12 +103,12 @@ public void addValidationError(UIInput<?> input, String errorMessage)
}
});

DirectoryResource targetDirectory = command.getTargetDirectory().getValue().getChildDirectory("test");
DirectoryResource targetDirectory = command.getTargetLocation().getValue().getChildDirectory("test");

Assert.assertFalse(targetDirectory.exists());
command.execute(context);
Assert.assertTrue(targetDirectory.exists());

targetDirectory.delete(true);
}
}

0 comments on commit 1f8e3dc

Please sign in to comment.