DATAMONGO-1785 - Upgrade to OpenWebBeans 2.0.1
Upgrade also to Equalsverifier 1.7.8 to resolve ASM version conflict.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
<properties>
|
||||
<objenesis>1.3</objenesis>
|
||||
<equalsverifier>1.5</equalsverifier>
|
||||
<equalsverifier>1.7.8</equalsverifier>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -146,26 +146,19 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.el</groupId>
|
||||
<artifactId>el-api</artifactId>
|
||||
<version>${cdi}</version>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${javax-annotation-api}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.openwebbeans.test</groupId>
|
||||
<artifactId>cditest-owb</artifactId>
|
||||
<groupId>org.apache.openwebbeans</groupId>
|
||||
<artifactId>openwebbeans-se</artifactId>
|
||||
<version>${webbeans}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- JSR 303 Validation -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
|
||||
@@ -29,7 +29,7 @@ import nl.jqno.equalsverifier.Warning;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link BasicQuery}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @author John Willemin
|
||||
|
||||
@@ -18,8 +18,9 @@ package org.springframework.data.mongodb.repository.cdi;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.apache.webbeans.cditest.CdiTestContainer;
|
||||
import org.apache.webbeans.cditest.CdiTestContainerLoader;
|
||||
import javax.enterprise.inject.se.SeContainer;
|
||||
import javax.enterprise.inject.se.SeContainerInitializer;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
@@ -27,29 +28,32 @@ import org.springframework.data.mongodb.repository.Person;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link MongoRepositoryExtension}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class CdiExtensionIntegrationTests {
|
||||
|
||||
static CdiTestContainer container;
|
||||
static SeContainer container;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws Exception {
|
||||
container = CdiTestContainerLoader.getCdiContainer();
|
||||
container.bootContainer();
|
||||
public static void setUp() {
|
||||
|
||||
container = SeContainerInitializer.newInstance() //
|
||||
.disableDiscovery() //
|
||||
.addPackages(CdiExtensionIntegrationTests.class) //
|
||||
.initialize();
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDown() throws Exception {
|
||||
container.shutdownContainer();
|
||||
public static void tearDown() {
|
||||
container.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // DATAMONGO-356, DATAMONGO-1785
|
||||
public void bootstrapsRepositoryCorrectly() {
|
||||
|
||||
RepositoryClient client = container.getInstance(RepositoryClient.class);
|
||||
RepositoryClient client = container.select(RepositoryClient.class).get();
|
||||
CdiPersonRepository repository = client.getRepository();
|
||||
|
||||
assertThat(repository, is(notNullValue()));
|
||||
@@ -63,11 +67,10 @@ public class CdiExtensionIntegrationTests {
|
||||
assertThat(repository.findById(person.getId()).get().getId(), is(result.getId()));
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1017
|
||||
@Test // DATAMONGO-1017, DATAMONGO-1785
|
||||
public void returnOneFromCustomImpl() {
|
||||
|
||||
RepositoryClient repositoryConsumer = container.getInstance(RepositoryClient.class);
|
||||
RepositoryClient repositoryConsumer = container.select(RepositoryClient.class).get();
|
||||
assertThat(repositoryConsumer.getSamplePersonRepository().returnOne(), is(1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user