Skip to content

Commit

Permalink
Adapt to upstream Spring Framework @MockitoBean changes
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Oct 23, 2024
1 parent 47fa83c commit 0305d1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ dependencies {
exclude group: "javax.xml.bind", module: "jaxb-api"
}
}

checkRuntimeClasspathForConflicts {
ignore { name -> name.startsWith("mockito-extensions/") }
}

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

package org.springframework.boot.test.mock.mockito;

import org.assertj.core.api.Condition;
import org.junit.jupiter.api.Test;
import org.mockito.internal.configuration.plugins.Plugins;
import org.mockito.plugins.MockResolver;

import static org.assertj.core.api.Assertions.assertThat;

Expand All @@ -33,7 +35,8 @@ class SpringBootMockResolverIntegrationTests {

@Test
void customMockResolverIsRegisteredWithMockito() {
assertThat(Plugins.getMockResolvers()).hasOnlyElementsOfType(SpringBootMockResolver.class);
assertThat(Plugins.getMockResolvers()).haveAtLeastOne(new Condition<MockResolver>(
SpringBootMockResolver.class::isInstance, "Spring Boot mock resolver instance"));
}

}

0 comments on commit 0305d1e

Please sign in to comment.