|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+package se.citerus.dddsample.acceptance;
|
|
|
2
|
+
|
|
|
3
|
+import org.junit.Test;
|
|
|
4
|
+import org.junit.runner.RunWith;
|
|
|
5
|
+import org.openqa.selenium.WebDriver;
|
|
|
6
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
7
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
8
|
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|
|
9
|
+import org.springframework.test.web.servlet.htmlunit.webdriver.MockMvcHtmlUnitDriverBuilder;
|
|
|
10
|
+import org.springframework.web.context.WebApplicationContext;
|
|
|
11
|
+import se.citerus.dddsample.Application;
|
|
|
12
|
+
|
|
|
13
|
+import static org.junit.Assert.assertNotEquals;
|
|
|
14
|
+
|
|
|
15
|
+@RunWith(SpringJUnit4ClassRunner.class)
|
|
|
16
|
+@SpringBootTest(classes = Application.class)
|
|
|
17
|
+public class DummyAcceptanceTest {
|
|
|
18
|
+
|
|
|
19
|
+ @Autowired
|
|
|
20
|
+ private WebApplicationContext context;
|
|
|
21
|
+
|
|
|
22
|
+ @Test
|
|
|
23
|
+ public void adminSiteCargoListContainsCannedCargo() throws InterruptedException {
|
|
|
24
|
+ WebDriver driver = MockMvcHtmlUnitDriverBuilder.webAppContextSetup(context).build();
|
|
|
25
|
+ driver.get("http://localhost:8080/dddsample/");
|
|
|
26
|
+ assertNotEquals("", driver.getPageSource());
|
|
|
27
|
+ }
|
|
|
28
|
+}
|