BAEL-4791 - clean up (#10804)

This commit is contained in:
freelansam
2021-05-26 01:23:21 +05:30
committed by GitHub
parent 6d77cd97e9
commit cf753786c6

View File

@@ -1,10 +1,7 @@
package com.baeldung.aliasfor;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
import java.lang.reflect.Method;
@@ -14,8 +11,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -57,8 +52,8 @@ public class AliasForUnitTest {
if (method.isAnnotationPresent(MyMapping.class)) {
MyMapping annotationOnBean = AnnotationUtils.findAnnotation(method, MyMapping.class);
assertTrue(annotationOnBean.mapping()[0].equals(annotationOnBean.route()[0]));
assertTrue(annotationOnBean.value()[0].equals(annotationOnBean.route()[0]));
assertEquals(annotationOnBean.mapping()[0], annotationOnBean.route()[0]);
assertEquals(annotationOnBean.value()[0], annotationOnBean.route()[0]);
}
}
}