Cleanup
This commit is contained in:
@@ -20,6 +20,7 @@ import static org.junit.Assert.assertThat;
|
||||
*/
|
||||
public class ConstructorInjectionTest {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void shouldReturnDependencies() {
|
||||
// given
|
||||
@@ -73,6 +74,7 @@ public class ConstructorInjectionTest {
|
||||
@Test
|
||||
public void shouldReturnNullForNoConstructorInjection() {
|
||||
// given / when
|
||||
@SuppressWarnings("rawtypes")
|
||||
Injection<FieldInjection> injection = ConstructorInjection.provide(FieldInjection.class).get();
|
||||
|
||||
// then
|
||||
|
||||
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertThat;
|
||||
*/
|
||||
public class FieldInjectionTest {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void shouldReturnDependencies() {
|
||||
// given
|
||||
@@ -105,9 +106,11 @@ public class FieldInjectionTest {
|
||||
}
|
||||
|
||||
private static class ThrowingConstructor {
|
||||
@SuppressWarnings("unused")
|
||||
@Inject
|
||||
private ProvidedClass providedClass;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public ThrowingConstructor() {
|
||||
throw new UnsupportedOperationException("Exception in constructor");
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import javax.inject.Inject;
|
||||
*/
|
||||
public class BadFieldInjection {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Inject
|
||||
private AlphaService alphaService;
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ import javax.inject.Inject;
|
||||
public abstract class InvalidPostConstruct {
|
||||
|
||||
public static final class WithParams {
|
||||
@SuppressWarnings("unused")
|
||||
@Inject
|
||||
private AlphaService alphaService;
|
||||
@SuppressWarnings("unused")
|
||||
@Inject
|
||||
private ProvidedClass providedClass;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import javax.inject.Inject;
|
||||
*/
|
||||
public class InvalidStaticFieldInjection {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Inject
|
||||
private ProvidedClass providedClass;
|
||||
@Inject
|
||||
|
||||
Reference in New Issue
Block a user