Commit 6de5a1385efaeaebc0cd54cd74efb3dbac3504f5
1 parent
e9fe17e1
Exists in
master
Organização dos testes
Showing
10 changed files
with
137 additions
and
68 deletions
Show diff stats
impl/core/pom.xml
... | ... | @@ -98,20 +98,59 @@ |
98 | 98 | <artifactId>cobertura-maven-plugin</artifactId> |
99 | 99 | </plugin> |
100 | 100 | |
101 | - <!-- <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> | |
102 | - <version>${jacoco.version}</version> <executions> <execution> <goals> <goal>prepare-agent</goal> | |
103 | - </goals> </execution> <execution> <id>report</id> <phase>prepare-package</phase> | |
104 | - <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> --> | |
101 | + <!-- | |
102 | + <plugin> | |
103 | + <groupId>org.jacoco</groupId> | |
104 | + <artifactId>jacoco-maven-plugin</artifactId> | |
105 | + <version>${jacoco.version}</version> | |
106 | + <executions> | |
107 | + <execution> | |
108 | + <goals> | |
109 | + <goal>prepare-agent</goal> | |
110 | + </goals> | |
111 | + </execution> | |
112 | + <execution> | |
113 | + <id>report</id> | |
114 | + <phase>prepare-package</phase> | |
115 | + <goals> | |
116 | + <goal>report</goal> | |
117 | + </goals> | |
118 | + </execution> | |
119 | + </executions> | |
120 | + </plugin> | |
121 | + --> | |
105 | 122 | </plugins> |
106 | 123 | |
107 | - <!-- <pluginManagement> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> | |
108 | - <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> | |
109 | - <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> | |
110 | - <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> | |
111 | - <versionRange>[${jacoco.version},)</versionRange> <goals> <goal>prepare-agent</goal> | |
112 | - </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> | |
113 | - </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> | |
114 | - </plugins> </pluginManagement> --> | |
124 | + <!-- | |
125 | + <pluginManagement> | |
126 | + <plugins> | |
127 | + <plugin> | |
128 | + <groupId>org.eclipse.m2e</groupId> | |
129 | + <artifactId>lifecycle-mapping</artifactId> | |
130 | + <version>1.0.0</version> | |
131 | + <configuration> | |
132 | + <lifecycleMappingMetadata> | |
133 | + <pluginExecutions> | |
134 | + <pluginExecution> | |
135 | + <pluginExecutionFilter> | |
136 | + <groupId>org.jacoco</groupId> | |
137 | + <artifactId>jacoco-maven-plugin</artifactId> | |
138 | + <versionRange>[${jacoco.version},)</versionRange> | |
139 | + <goals> | |
140 | + <goal>prepare-agent</goal> | |
141 | + </goals> | |
142 | + </pluginExecutionFilter> | |
143 | + <action> | |
144 | + <ignore></ignore> | |
145 | + </action> | |
146 | + </pluginExecution> | |
147 | + </pluginExecutions> | |
148 | + </lifecycleMappingMetadata> | |
149 | + </configuration> | |
150 | + </plugin> | |
151 | + </plugins> | |
152 | + </pluginManagement> | |
153 | + --> | |
115 | 154 | </build> |
116 | 155 | |
117 | 156 | <dependencies> |
... | ... | @@ -163,27 +202,44 @@ |
163 | 202 | <scope>test</scope> |
164 | 203 | </dependency> |
165 | 204 | <dependency> |
205 | + <groupId>org.slf4j</groupId> | |
206 | + <artifactId>slf4j-log4j12</artifactId> | |
207 | + <scope>test</scope> | |
208 | + </dependency> | |
209 | + | |
210 | + <!-- | |
211 | + <dependency> | |
166 | 212 | <groupId>javax.servlet</groupId> |
167 | 213 | <artifactId>servlet-api</artifactId> |
168 | 214 | <scope>test</scope> |
169 | 215 | </dependency> |
170 | 216 | |
171 | - <!-- <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-jacoco</artifactId> | |
172 | - <version>1.0.0.Alpha5</version> <scope>test</scope> </dependency> <dependency> | |
173 | - <groupId>org.jacoco</groupId> <artifactId>org.jacoco.core</artifactId> <version>${jacoco.version}</version> | |
174 | - <scope>test</scope> </dependency> --> | |
175 | - | |
176 | - <!-- <dependency> <groupId>org.jboss.shrinkwrap.descriptors</groupId> <artifactId>shrinkwrap-descriptors-spi</artifactId> | |
177 | - <version>2.0.0-alpha-4</version> <scope>test</scope> </dependency> --> | |
178 | - | |
179 | - <!-- <dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> | |
180 | - <scope>test</scope> </dependency> --> | |
181 | 217 | <dependency> |
182 | - <groupId>org.slf4j</groupId> | |
183 | - <artifactId>slf4j-log4j12</artifactId> | |
218 | + <groupId>org.jboss.arquillian.extension</groupId> | |
219 | + <artifactId>arquillian-jacoco</artifactId> | |
220 | + <version>1.0.0.Alpha5</version> | |
221 | + <scope>test</scope> | |
222 | + </dependency> | |
223 | + <dependency> | |
224 | + <groupId>org.jacoco</groupId> | |
225 | + <artifactId>org.jacoco.core</artifactId> | |
226 | + <version>${jacoco.version}</version> | |
227 | + <scope>test</scope> | |
228 | + </dependency> | |
229 | + | |
230 | + <dependency> | |
231 | + <groupId>org.jboss.shrinkwrap.descriptors</groupId> | |
232 | + <artifactId>shrinkwrap-descriptors-spi</artifactId> | |
233 | + <version>2.0.0-alpha-4</version> | |
184 | 234 | <scope>test</scope> |
185 | 235 | </dependency> |
186 | 236 | |
237 | + <dependency> | |
238 | + <groupId>javax.el</groupId> | |
239 | + <artifactId>el-api</artifactId> | |
240 | + <scope>test</scope> | |
241 | + </dependency> | |
242 | + --> | |
187 | 243 | </dependencies> |
188 | 244 | |
189 | 245 | <repositories> | ... | ... |
impl/core/src/test/java/management/AnnotationTestCase.java
... | ... | @@ -72,7 +72,7 @@ public class AnnotationTestCase { |
72 | 72 | .create(JavaArchive.class) |
73 | 73 | .addClass(LocaleProducer.class) |
74 | 74 | .addPackages(true, "br") |
75 | - .addAsResource(new FileAsset(new File("src/test/resources/test/beans.xml")), "beans.xml") | |
75 | + .addAsResource(new FileAsset(new File("src/test/resources/beans.xml")), "beans.xml") | |
76 | 76 | .addAsManifestResource( |
77 | 77 | new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), |
78 | 78 | "services/javax.enterprise.inject.spi.Extension") | ... | ... |
impl/core/src/test/java/management/ManagementBootstrapTestCase.java
... | ... | @@ -76,7 +76,7 @@ public class ManagementBootstrapTestCase { |
76 | 76 | .addPackages(true, "br") |
77 | 77 | .addAsResource( |
78 | 78 | new FileAsset(new File( |
79 | - "src/test/resources/test/beans.xml")), | |
79 | + "src/test/resources/beans.xml")), | |
80 | 80 | "beans.xml") |
81 | 81 | .addAsManifestResource( |
82 | 82 | new File( | ... | ... |
impl/core/src/test/java/management/ManagementTestCase.java
... | ... | @@ -72,7 +72,7 @@ public class ManagementTestCase { |
72 | 72 | .create(JavaArchive.class) |
73 | 73 | .addClass(LocaleProducer.class) |
74 | 74 | .addPackages(true, "br") |
75 | - .addAsResource(new FileAsset(new File("src/test/resources/test/beans.xml")), "beans.xml") | |
75 | + .addAsResource(new FileAsset(new File("src/test/resources/beans.xml")), "beans.xml") | |
76 | 76 | .addAsManifestResource( |
77 | 77 | new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), |
78 | 78 | "services/javax.enterprise.inject.spi.Extension") | ... | ... |
impl/core/src/test/java/management/NotificationTestCase.java
... | ... | @@ -85,7 +85,7 @@ public class NotificationTestCase { |
85 | 85 | .create(JavaArchive.class) |
86 | 86 | .addClass(LocaleProducer.class) |
87 | 87 | .addPackages(true, "br") |
88 | - .addAsResource(new FileAsset(new File("src/test/resources/test/beans.xml")), "beans.xml") | |
88 | + .addAsResource(new FileAsset(new File("src/test/resources/beans.xml")), "beans.xml") | |
89 | 89 | .addAsManifestResource( |
90 | 90 | new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), |
91 | 91 | "services/javax.enterprise.inject.spi.Extension") | ... | ... |
impl/core/src/test/java/management/ValidationTestCase.java
... | ... | @@ -30,7 +30,7 @@ public class ValidationTestCase { |
30 | 30 | .create(JavaArchive.class) |
31 | 31 | .addClass(LocaleProducer.class) |
32 | 32 | .addPackages(true, "br") |
33 | - .addAsResource(new FileAsset(new File("src/test/resources/test/beans.xml")), "beans.xml") | |
33 | + .addAsResource(new FileAsset(new File("src/test/resources/beans.xml")), "beans.xml") | |
34 | 34 | .addAsManifestResource( |
35 | 35 | new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), |
36 | 36 | "services/javax.enterprise.inject.spi.Extension") | ... | ... |
impl/core/src/test/java/test/Tests.java
... | ... | @@ -41,7 +41,6 @@ import java.io.File; |
41 | 41 | import org.jboss.shrinkwrap.api.ShrinkWrap; |
42 | 42 | import org.jboss.shrinkwrap.api.asset.FileAsset; |
43 | 43 | import org.jboss.shrinkwrap.api.spec.JavaArchive; |
44 | -import org.junit.Test; | |
45 | 44 | |
46 | 45 | public final class Tests { |
47 | 46 | |
... | ... | @@ -57,7 +56,7 @@ public final class Tests { |
57 | 56 | .create(JavaArchive.class) |
58 | 57 | .addClass(LocaleProducer.class) |
59 | 58 | .addPackages(true, "br") |
60 | - .addAsResource(Tests.createFileAsset("src/test/resources/test/beans.xml"), "beans.xml") | |
59 | + .addAsResource(Tests.createFileAsset("src/test/resources/beans.xml"), "beans.xml") | |
61 | 60 | .addAsManifestResource( |
62 | 61 | new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), |
63 | 62 | "services/javax.enterprise.inject.spi.Extension"); |
... | ... | @@ -66,8 +65,4 @@ public final class Tests { |
66 | 65 | public static FileAsset createFileAsset(final String pathname) { |
67 | 66 | return new FileAsset(new File(pathname)); |
68 | 67 | } |
69 | - | |
70 | - @Test | |
71 | - public void test(){ | |
72 | - } | |
73 | 68 | } | ... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
2 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> | |
3 | + | |
4 | + <interceptors> | |
5 | + <class>br.gov.frameworkdemoiselle.transaction.TransactionalInterceptor</class> | |
6 | + <class>br.gov.frameworkdemoiselle.security.RequiredPermissionInterceptor</class> | |
7 | + <class>br.gov.frameworkdemoiselle.security.RequiredRoleInterceptor</class> | |
8 | + <class>br.gov.frameworkdemoiselle.exception.ExceptionHandlerInterceptor</class> | |
9 | + </interceptors> | |
10 | + | |
11 | +</beans> | ... | ... |
impl/core/src/test/resources/test/beans.xml
... | ... | @@ -1,11 +0,0 @@ |
1 | -<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
2 | - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> | |
3 | - | |
4 | - <interceptors> | |
5 | - <class>br.gov.frameworkdemoiselle.transaction.TransactionalInterceptor</class> | |
6 | - <class>br.gov.frameworkdemoiselle.security.RequiredPermissionInterceptor</class> | |
7 | - <class>br.gov.frameworkdemoiselle.security.RequiredRoleInterceptor</class> | |
8 | - <class>br.gov.frameworkdemoiselle.exception.ExceptionHandlerInterceptor</class> | |
9 | - </interceptors> | |
10 | - | |
11 | -</beans> |
parent/bom/pom.xml
... | ... | @@ -307,6 +307,13 @@ |
307 | 307 | <artifactId>commons-dbcp</artifactId> |
308 | 308 | <version>${commons.dbcp.version}</version> |
309 | 309 | </dependency> |
310 | + | |
311 | + <!-- embedded containners --> | |
312 | + <dependency> | |
313 | + <groupId>org.glassfish.main.extras</groupId> | |
314 | + <artifactId>glassfish-embedded-web</artifactId> | |
315 | + <version>${glassfish.embedded.version}</version> | |
316 | + </dependency> | |
310 | 317 | |
311 | 318 | <!-- embedded database --> |
312 | 319 | <dependency> |
... | ... | @@ -328,24 +335,11 @@ |
328 | 335 | <version>${junit.version}</version> |
329 | 336 | </dependency> |
330 | 337 | <dependency> |
331 | - <groupId>org.powermock</groupId> | |
332 | - <artifactId>powermock-module-junit4</artifactId> | |
333 | - <version>${powermock.version}</version> | |
334 | - </dependency> | |
335 | - <dependency> | |
336 | - <groupId>org.powermock</groupId> | |
337 | - <artifactId>powermock-api-easymock</artifactId> | |
338 | - <version>${powermock.version}</version> | |
339 | - </dependency> | |
340 | - <dependency> | |
341 | - <groupId>org.easymock</groupId> | |
342 | - <artifactId>easymock</artifactId> | |
343 | - <version>${easymock.version}</version> | |
344 | - </dependency> | |
345 | - <dependency> | |
346 | - <groupId>org.jboss.arquillian.junit</groupId> | |
347 | - <artifactId>arquillian-junit-container</artifactId> | |
338 | + <groupId>org.jboss.arquillian</groupId> | |
339 | + <artifactId>arquillian-bom</artifactId> | |
348 | 340 | <version>${arquillian.version}</version> |
341 | + <scope>import</scope> | |
342 | + <type>pom</type> | |
349 | 343 | </dependency> |
350 | 344 | <dependency> |
351 | 345 | <groupId>org.jboss.arquillian.container</groupId> |
... | ... | @@ -354,14 +348,35 @@ |
354 | 348 | </dependency> |
355 | 349 | <dependency> |
356 | 350 | <groupId>org.jboss.arquillian.container</groupId> |
357 | - <artifactId>arquillian-weld-ee-embedded-1.1</artifactId> | |
358 | - <version>${arquillian.weld.ee.embedded.version}</version> | |
351 | + <artifactId>arquillian-glassfish-embedded-3.1</artifactId> | |
352 | + <version>${arquillian.glassfish.embedded.version}</version> | |
353 | + </dependency> | |
354 | + <dependency> | |
355 | + <groupId>org.jboss.arquillian.extension</groupId> | |
356 | + <artifactId>arquillian-persistence-impl</artifactId> | |
357 | + <version>${arquillian.persistence.version}</version> | |
358 | + <scope>test</scope> | |
359 | 359 | </dependency> |
360 | 360 | <dependency> |
361 | 361 | <groupId>org.jboss.weld.se</groupId> |
362 | 362 | <artifactId>weld-se-core</artifactId> |
363 | 363 | <version>${weld.version}</version> |
364 | 364 | </dependency> |
365 | + <dependency> | |
366 | + <groupId>org.powermock</groupId> | |
367 | + <artifactId>powermock-module-junit4</artifactId> | |
368 | + <version>${powermock.version}</version> | |
369 | + </dependency> | |
370 | + <dependency> | |
371 | + <groupId>org.powermock</groupId> | |
372 | + <artifactId>powermock-api-easymock</artifactId> | |
373 | + <version>${powermock.version}</version> | |
374 | + </dependency> | |
375 | + <dependency> | |
376 | + <groupId>org.easymock</groupId> | |
377 | + <artifactId>easymock</artifactId> | |
378 | + <version>${easymock.version}</version> | |
379 | + </dependency> | |
365 | 380 | </dependencies> |
366 | 381 | </dependencyManagement> |
367 | 382 | |
... | ... | @@ -406,9 +421,12 @@ |
406 | 421 | <junit.version>4.8.1</junit.version> |
407 | 422 | <easymock.version>3.0</easymock.version> |
408 | 423 | |
409 | - <arquillian.version>1.0.3.Final</arquillian.version> | |
410 | - <arquillian.weld.se.embedded.version>1.0.0.CR6</arquillian.weld.se.embedded.version> | |
411 | - <arquillian.weld.ee.embedded.version>1.0.0.CR6</arquillian.weld.ee.embedded.version> | |
424 | + <arquillian.version>1.1.1.Final</arquillian.version> | |
425 | + <arquillian.weld.se.embedded.version>1.0.0.CR7</arquillian.weld.se.embedded.version> | |
426 | + <arquillian.persistence.version>1.0.0.Alpha6</arquillian.persistence.version> | |
427 | + <arquillian.glassfish.embedded.version>1.0.0.CR3</arquillian.glassfish.embedded.version> | |
428 | + | |
429 | + <glassfish.embedded.version>3.1.2</glassfish.embedded.version> | |
412 | 430 | |
413 | 431 | <powermock.version>1.4.6</powermock.version> |
414 | 432 | <primefaces.version>3.4</primefaces.version> | ... | ... |