Skip to content

make the project compatible with assertj-core:3.15.0 #4

@Simulant87

Description

@Simulant87

I have a project setup with this annotation-validator 2.0 and an explicit dependency to org.assertj:assertj-core:3.15.0 so the annotation-validator also uses the upgraded version of the dependency.

Having a test case like this, fails:

	@Test
	public void activatedAnnotatedCorrect() throws Exception {
		validate()
				.only()
				.annotation(type(Column.class))
				.forField(getFieldByName("activated"));
	}

With the stacktrace:

java.lang.NoSuchMethodError: org.assertj.core.api.OptionalAssert.as(Ljava/lang/String;[Ljava/lang/Object;)Lorg/assertj/core/api/AbstractAssert;
at de.tolina.common.validation.AnnotationValidation.forClassOrMethodOrField(AnnotationValidation.java:163)
at de.tolina.common.validation.AnnotationValidation.forField(AnnotationValidation.java:142)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions