DATACMNS-1159 - Upgrade to OpenWebBeans 2.0.1.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,35 +15,39 @@
|
||||
*/
|
||||
package org.springframework.data.repository.cdi;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* CDI extension integration test using OpenWebbeans.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class WebbeansCdiRepositoryExtensionSupportIntegrationTests extends
|
||||
CdiRepositoryExtensionSupportIntegrationTests {
|
||||
public class WebbeansCdiRepositoryExtensionSupportIntegrationTests
|
||||
extends CdiRepositoryExtensionSupportIntegrationTests {
|
||||
|
||||
static CdiTestContainer container;
|
||||
private static SeContainer container;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws Exception {
|
||||
public static void setUp() {
|
||||
|
||||
container = CdiTestContainerLoader.getCdiContainer();
|
||||
container.bootContainer();
|
||||
container = SeContainerInitializer.newInstance() //
|
||||
.disableDiscovery() //
|
||||
.addPackages(SampleRepository.class) //
|
||||
.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <T> T getBean(Class<T> type) {
|
||||
return container.getInstance(type);
|
||||
return container.select(type).get();
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDown() throws Exception {
|
||||
container.shutdownContainer();
|
||||
public static void tearDown() {
|
||||
container.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user