From 2244dbd8ce104d8f3f06a6ef20a524fb398fbe95 Mon Sep 17 00:00:00 2001 From: Ulf Sauer Date: Wed, 7 Jul 2021 10:45:46 +0200 Subject: [PATCH] Revert "Test custom EncryptionEventListener bean registration" This reverts commit 3eacf6dd5692646d72d5fb04eb7ea8e252589b37. --- ...EncryptionWithCustomEventListenerTest.java | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/test/java/com/bol/system/autoconfig/EncryptionWithCustomEventListenerTest.java diff --git a/src/test/java/com/bol/system/autoconfig/EncryptionWithCustomEventListenerTest.java b/src/test/java/com/bol/system/autoconfig/EncryptionWithCustomEventListenerTest.java deleted file mode 100644 index 2b19d6e..0000000 --- a/src/test/java/com/bol/system/autoconfig/EncryptionWithCustomEventListenerTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.bol.system.autoconfig; - -import com.bol.config.EncryptAutoConfiguration; -import com.bol.crypt.CryptVault; -import com.bol.secure.AbstractEncryptionEventListener; -import com.bol.secure.CachedEncryptionEventListener; -import com.bol.secure.ReflectionEncryptionEventListener; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringRunner; - -import static org.assertj.core.api.Assertions.assertThat; - -@ActiveProfiles("autoconfig-short") -@RunWith(SpringRunner.class) -@EnableAutoConfiguration -@SpringBootTest(classes = {EncryptionWithCustomEventListenerTest.class, EncryptionWithCustomEventListenerTest.AbstractEventListenerConfig.class, EncryptAutoConfiguration.class}) -public class EncryptionWithCustomEventListenerTest { - - @Autowired(required = false) CryptVault cryptVault; - @Autowired(required = false) AbstractEncryptionEventListener eventListener; - - @Test - public void sanityTest() { - assertThat(cryptVault).isNotNull(); - assertThat(eventListener).isNotNull(); - assertThat(eventListener).isInstanceOf(ReflectionEncryptionEventListener.class); - } - - - @TestConfiguration - static class AbstractEventListenerConfig { - @Bean - ReflectionEncryptionEventListener encryptionEventListener(CryptVault cryptVault) { - return new ReflectionEncryptionEventListener(cryptVault); - } - } -}