Skip to content

Commit

Permalink
call #destroy to all testers
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrosans committed Nov 5, 2024
1 parent 1d58bc3 commit 5d6bd76
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,23 @@
*/
package org.apache.wicket.cdi;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

import io.github.cdiunit.ActivatedAlternatives;
import jakarta.enterprise.inject.spi.BeanManager;
import jakarta.inject.Inject;
import org.apache.wicket.Application;
import org.apache.wicket.cdi.testapp.AlternativeTestAppScope;
import org.apache.wicket.cdi.testapp.ModelWithInjectedDependency;
import org.apache.wicket.cdi.testapp.TestConversationPage;
import org.apache.wicket.cdi.testapp.TestPage;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import io.github.cdiunit.ActivatedAlternatives;
import jakarta.enterprise.inject.spi.BeanManager;
import jakarta.inject.Inject;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

/**
* @author jsarman
*/
@ActivatedAlternatives(AlternativeTestAppScope.class)
@Disabled
class CdiConfigurationTest extends WicketCdiTestCase
{
@Inject
Expand Down Expand Up @@ -104,13 +100,12 @@ void testConfigureTwice()
@Test
void testApplicationLevelConfiguration()
{
WicketTester tester = new WicketTester();
CdiConfiguration config = new CdiConfiguration();
for (ConversationPropagation cp : ConversationPropagation.values())
{
config.setPropagation(cp);
assertEquals(cp, config.getPropagation());
}
config.configure(tester.getApplication());
configure(config);
}
}

0 comments on commit 5d6bd76

Please sign in to comment.