Skip to content

Commit

Permalink
CAUSEWAY-3647: remove code in prev. commit thats not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
andi-huber committed Nov 19, 2023
1 parent 618182b commit 6b8bb5f
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
*/
package org.apache.causeway.testing.integtestsupport.applib;

import java.util.Optional;

import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.springframework.context.ApplicationContext;

import org.apache.causeway.applib.services.iactnlayer.InteractionService;
import org.apache.causeway.commons.internal.assertions._Assert;
Expand Down Expand Up @@ -64,19 +61,4 @@ public void afterEach(final ExtensionContext extensionContext) throws Exception
.ifPresent(InteractionService::closeInteractionLayers);
}


static Optional<ApplicationContext> getSpringContext(final ExtensionContext extensionContext) {
return extensionContext.getTestInstance()
.filter(CausewayIntegrationTestAbstract.class::isInstance)
.map(CausewayIntegrationTestAbstract.class::cast)
.map(causewayIntegrationTestAbstract -> causewayIntegrationTestAbstract.springContext)
.map(springContext->{
var mmc = springContext.getBean(MetaModelContext.class);
_Assert.assertNotNull(mmc, ()->
"MetaModelContext not found on Spring's test context.");
MetaModelContext.setOrReplace(mmc);
return springContext;
});
}

}

0 comments on commit 6b8bb5f

Please sign in to comment.