#14 - Remove agent loading feature for spring boot as it has been moved to ebean-spring-agent

This commit is contained in:
Rob Bygrave
2016-12-21 20:53:33 +13:00
parent 23c278d878
commit 83d84f6079
6 changed files with 11 additions and 206 deletions
@@ -1,35 +0,0 @@
package io.ebean.spring.boot;
import io.ebean.bean.EntityBean;
import org.junit.Test;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.unenhanced.Boondoggle;
import org.unenhanced.Wotsit;
import static org.assertj.core.api.StrictAssertions.assertThat;
@SpringBootTest(webEnvironment=WebEnvironment.NONE)
public class EbeanAgentAutoConfigurationTest extends AbstractJUnit4SpringContextTests {
static {
// Validate our test setup. Agent should not be loaded yet, so 'Boondoggle'
// should have been enhanced neither at build time nor at load time.
assertThat(EntityBean.class.isAssignableFrom(Boondoggle.class)).isFalse();
}
@Configuration
@EnableAutoConfiguration
public static class Config {
/* no beans needed for this test */
}
@Test
public void testAgentIsWorking() {
// Wotsit is outside of the org.example package that's being enhanced
// at build time, so should be picked up by the agent only.
assertThat(EntityBean.class.isAssignableFrom(Wotsit.class)).isTrue();
}
}
@@ -1,11 +0,0 @@
package org.unenhanced;
import javax.persistence.Entity;
import javax.persistence.Id;
// Not in org.example, i.e. not enhanced at build time
@Entity
public class Boondoggle {
@Id
public String name;
}
-11
View File
@@ -1,11 +0,0 @@
package org.unenhanced;
import javax.persistence.Entity;
import javax.persistence.Id;
// Not in org.example, i.e. not enhanced at build time
@Entity
public class Wotsit {
@Id
public String name;
}