BAEL-4068 Remove AspectJ DI from module spring-di

This commit is contained in:
Nguyen Nam Thai
2020-06-23 18:01:17 +07:00
parent 580a3bb920
commit fd16e9ed4f
6 changed files with 1 additions and 142 deletions
@@ -1,24 +0,0 @@
package com.baeldung.di.aspectj;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertEquals;
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = AspectJConfig.class)
public class PersonUnitTest {
@Test
public void givenUnmanagedObjects_whenInjectingIdService_thenIdValueIsCorrectlySet() {
PersonObject personObject = new PersonObject("Baeldung");
personObject.generateId();
assertEquals(1, personObject.getId());
assertEquals("Baeldung", personObject.getName());
PersonEntity personEntity = new PersonEntity("Baeldung");
assertEquals(2, personEntity.getId());
assertEquals("Baeldung", personEntity.getName());
}
}