|
|
@ -31,6 +31,7 @@ import static org.junit.Assert.assertThat;
|
|
|
|
* Tests for {@link Layouts}.
|
|
|
|
* Tests for {@link Layouts}.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author Phillip Webb
|
|
|
|
* @author Phillip Webb
|
|
|
|
|
|
|
|
* @author Andy Wilkinson
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class LayoutsTests {
|
|
|
|
public class LayoutsTests {
|
|
|
|
|
|
|
|
|
|
|
@ -65,6 +66,8 @@ public class LayoutsTests {
|
|
|
|
Layout layout = new Layouts.Jar();
|
|
|
|
Layout layout = new Layouts.Jar();
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.COMPILE),
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.COMPILE),
|
|
|
|
equalTo("lib/"));
|
|
|
|
equalTo("lib/"));
|
|
|
|
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.CUSTOM),
|
|
|
|
|
|
|
|
equalTo("lib/"));
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.PROVIDED),
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.PROVIDED),
|
|
|
|
equalTo("lib/"));
|
|
|
|
equalTo("lib/"));
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.RUNTIME),
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.RUNTIME),
|
|
|
@ -76,6 +79,8 @@ public class LayoutsTests {
|
|
|
|
Layout layout = new Layouts.War();
|
|
|
|
Layout layout = new Layouts.War();
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.COMPILE),
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.COMPILE),
|
|
|
|
equalTo("WEB-INF/lib/"));
|
|
|
|
equalTo("WEB-INF/lib/"));
|
|
|
|
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.CUSTOM),
|
|
|
|
|
|
|
|
equalTo("WEB-INF/lib/"));
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.PROVIDED),
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.PROVIDED),
|
|
|
|
equalTo("WEB-INF/lib-provided/"));
|
|
|
|
equalTo("WEB-INF/lib-provided/"));
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.RUNTIME),
|
|
|
|
assertThat(layout.getLibraryDestination("lib.jar", LibraryScope.RUNTIME),
|
|
|
|