use of org.archifacts.core.descriptor.BuildingBlockDescriptor in project archifacts by archifacts.
the class SpringDescriptorTest method assertThat_building_blocks_are_recognized.
@ParameterizedTest
@MethodSource("getBuildingBlocks")
void assertThat_building_blocks_are_recognized(final BuildingBlockDescriptor buildingBlockDescriptor, final Class<?>... matchingClasses) {
final Application application = Application.builder().descriptor(buildingBlockDescriptor).buildApplication(DOMAIN);
final Set<String> expectedClassNames = Arrays.stream(matchingClasses).map(Class::getName).collect(Collectors.toSet());
assertThat(application.getBuildingBlocksOfType(buildingBlockDescriptor.type())).map(b -> b.getJavaClass().getName()).allMatch(name -> expectedClassNames.contains(name));
}
use of org.archifacts.core.descriptor.BuildingBlockDescriptor in project archifacts by archifacts.
the class AxonDescriptorsTest method assertThat_building_blocks_are_recognized.
@ParameterizedTest
@MethodSource("getBuildingBlocks")
void assertThat_building_blocks_are_recognized(final BuildingBlockDescriptor buildingBlockDescriptor, final Class<?>... matchingClasses) {
final Application application = Application.builder().descriptor(buildingBlockDescriptor).buildApplication(DOMAIN);
final Set<String> expectedClassNames = Arrays.stream(matchingClasses).map(Class::getName).collect(Collectors.toSet());
assertThat(application.getBuildingBlocksOfType(buildingBlockDescriptor.type())).map(b -> b.getJavaClass().getName()).allMatch(name -> expectedClassNames.contains(name));
}
Aggregations