1 package org.apache.tomcat.maven.it;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import org.junit.Test;
24 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory;
26
27 import static junitx.framework.StringAssert.assertContains;
28 import static org.junit.Assert.assertNotNull;
29
30
31
32
33
34
35 public class AbstractUsageContextpathIT
36 extends AbstractWarProjectIT
37 {
38 private static final Logger LOG = LoggerFactory.getLogger( AbstractUsageContextpathIT.class );
39
40 private static final String WEBAPP_URL = "http://localhost:" + getHttpItPort() + "/lorem/index.html";
41
42
43
44
45 private static final String WAR_ARTIFACT_ID = "usage-contextpath";
46
47 @Override
48 protected String getWebappUrl()
49 {
50 return WEBAPP_URL;
51 }
52
53 @Override
54 protected String getWarArtifactId()
55 {
56 return WAR_ARTIFACT_ID;
57 }
58
59 @Test
60 public void testIt()
61 throws Exception
62 {
63 final String responseBody = executeVerifyWithGet();
64 assertNotNull( "Received message body must not be null.", responseBody );
65 assertContains( "Response must match expected content.", "Success!", responseBody );
66
67 LOG.info( "Error Free Log check" );
68 verifier.verifyErrorFreeLog();
69 }
70
71 }