use of com.github.nagyesta.abortmission.core.extractor.impl.StringDependencyNameExtractor in project abort-mission by nagyesta.
the class DependencyMatcherTest method testMatchesShouldUseExactMatchWhenCalledWithString.
@ParameterizedTest
@MethodSource("inputProvider")
void testMatchesShouldUseExactMatchWhenCalledWithString(final boolean matches, final String dependency) {
// given
final MissionHealthCheckMatcher underTest = MissionHealthCheckMatcherBuilder.builder().dependencyWith(dependency).extractor(new StringDependencyNameExtractor()).build();
// when
final boolean actual = underTest.matches(MATCHING_DEPENDENCY);
// then
assertEquals(matches, actual);
}
use of com.github.nagyesta.abortmission.core.extractor.impl.StringDependencyNameExtractor in project abort-mission by nagyesta.
the class DependencyMatcherTest method testMatchesShouldThrowExceptionWhenCalledWithUnsupportedInput.
@ParameterizedTest
@NullSource
@MethodSource("unsupportedComponentProvider")
void testMatchesShouldThrowExceptionWhenCalledWithUnsupportedInput(final Object invalidInput) {
// given
final MissionHealthCheckMatcher underTest = MissionHealthCheckMatcherBuilder.builder().dependencyWith(MATCHING_DEPENDENCY).extractor(new StringDependencyNameExtractor()).build();
// when
final boolean actual = underTest.matches(invalidInput);
// then
assertFalse(actual);
}
Aggregations