Skip to content

Commit

Permalink
Rename function to comply with proxy method name
Browse files Browse the repository at this point in the history
  • Loading branch information
Afrin Subair committed Aug 11, 2016
1 parent b93b722 commit a6b55d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Expand Up @@ -147,27 +147,26 @@ public void setBaseResource(Resource... baseResources) {
handler.setBaseResource(new ResourceCollection(baseResources));
}

/**
* Sets the base resource for this context.
* @param resourceBase A string representing the base resource for the context. Any
* string accepted by Resource.newResource(String) may be passed
* and the call is equivalent to {@link #setBaseResource(Resource)}}
*/
public void setResourceBase(String resourceBase) {
handler.setResourceBase(resourceBase);
}

/**
* Sets the base resources for this context.
*
* @param resources A list of strings representing the base resources to serve static
* content for the context. Any string accepted by Resource.newResource(String)
* may be passed and the call is equivalent to {@link #setBaseResource(Resource...)}}
*/
public void setResourceBase(String... resources) {
public void setBaseResource(String... resources) {
handler.setBaseResource(new ResourceCollection(resources));
}

/**
* Sets the base resource for this context.
* @param resourceBase A string representing the base resource for the context. Any
* string accepted by Resource.newResource(String) may be passed
* and the call is equivalent to {@link #setBaseResource(Resource)}}
*/
public void setResourceBase(String resourceBase) {
handler.setResourceBase(resourceBase);
}

/**
* Set an initialization parameter.
Expand Down
Expand Up @@ -161,12 +161,12 @@ public void setsResourceBase() throws Exception {
}

@Test
public void setsResourceBaseList() throws Exception {
public void setsBaseResourceStringList() throws Exception {
String wooResource = tempDir.newFolder().getAbsolutePath();
String fooResource = tempDir.newFolder().getAbsolutePath();

final String[] testResources = new String[]{wooResource, fooResource};
environment.setResourceBase(testResources);
environment.setBaseResource(testResources);

ArgumentCaptor<Resource> captor = ArgumentCaptor.forClass(Resource.class);
verify(handler).setBaseResource(captor.capture());
Expand Down

0 comments on commit a6b55d1

Please sign in to comment.