1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jboss.hal.testsuite.test.configuration.jpa;
17
18 import org.jboss.arquillian.core.api.annotation.Inject;
19 import org.jboss.arquillian.graphene.page.Page;
20 import org.jboss.hal.testsuite.CrudOperations;
21 import org.jboss.hal.testsuite.container.WildFlyContainer;
22 import org.jboss.hal.testsuite.fragment.FormFragment;
23 import org.jboss.hal.testsuite.page.configuration.JpaPage;
24 import org.jboss.hal.testsuite.test.Manatoko;
25 import org.junit.jupiter.api.BeforeEach;
26 import org.junit.jupiter.api.Test;
27 import org.testcontainers.junit.jupiter.Container;
28 import org.testcontainers.junit.jupiter.Testcontainers;
29
30 import static org.jboss.hal.testsuite.container.WildFlyConfiguration.DEFAULT;
31 import static org.jboss.hal.testsuite.fixtures.JpaFixtures.DEFAULT_EXTENDED_PERSISTENCE_INHERITANCE;
32 import static org.jboss.hal.testsuite.fixtures.JpaFixtures.SHALLOW;
33 import static org.jboss.hal.testsuite.fixtures.JpaFixtures.SUBSYSTEM_ADDRESS;
34
35 @Manatoko
36 @Testcontainers
37 class JpaTest {
38
39 @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
40
41 @Inject CrudOperations crud;
42 @Page JpaPage page;
43 FormFragment form;
44
45 @BeforeEach
46 void setUp() {
47 page.navigate();
48 form = page.getForm();
49 }
50
51 @Test
52 void update() throws Exception {
53 crud.update(SUBSYSTEM_ADDRESS, form,
54 f -> f.select(DEFAULT_EXTENDED_PERSISTENCE_INHERITANCE, SHALLOW),
55 resourceVerifier -> resourceVerifier.verifyAttribute(DEFAULT_EXTENDED_PERSISTENCE_INHERITANCE,
56 SHALLOW));
57 }
58
59 @Test
60 void reset() throws Exception {
61 crud.reset(SUBSYSTEM_ADDRESS, form);
62 }
63 }