package at.gv.egovernment.moa.id.auth.modules.ehvd.test; import static org.junit.Assert.assertNotNull; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import at.gv.egovernment.moa.id.auth.modules.ehvd.EhvdServiceAuthModule; import at.gv.egovernment.moa.id.auth.modules.ehvd.test.dummy.DummyAuthConfigMap; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({ "/test_ehvd_service_auth_lazy.beans.xml" }) public class BeanCreationTest { @Autowired DummyAuthConfigMap config; @Autowired ApplicationContext context; @Before public void initialize() { // re-set config config.putConfigValue("modules.ehvd.enabled", String.valueOf(false)); } @Test public void authModuleDeactivated() { assertNotNull("AuthModule", context.getBean(EhvdServiceAuthModule.class)); } }