How To test 2 different Aggregate

Hi,

Is possible with AggregateTestFixture test 2 different Aggregate of same type?

so I have to update 2 different aggregate with same propeties, on external CommandHandler i received a command with 2 different id to update and load it with repository.load and execute a aggregate method for any aggregate.
Is possible to simulate it on test?

`

@CommandHandler
public void handle(final ChangeStationMainDataCommand command) {
validateCommandValue(command.getStationId(), command.getDraftId());

repository.load(command.getStationId())
.execute(sa -> sa.handle(command));

if (command.getMappingOneToOne()) {
if (command.isElementary()) {
final StationEntity networkStation = stationRepository.findStationByLevelAndCode(command.getDraftId(), StationType.NETWORK.id(), command.getCode())
.orElseThrow(() -> new StationNotFoundException("Network with code: " + command.getCode() + " not found in draft: " + command.getDraftId()));
repository.load(networkStation.getStationId())
.execute(sa -> sa.handle(new ChangeStationMainDataCommand(networkStation.getStationId(),
command.getDraftId(), networkStation.getLevel(), networkStation.getCode(),
command.getLongDesc(), command.getShortDesc(), command.getMappingOneToOne())));
}

if (command.isNetwork()) {

final StationEntity elementaryStation = stationRepository.findStationByLevelAndCode(command.getDraftId(), StationType.ELEMENTARY.id(), command.getCode())
.orElseThrow(() -> new StationNotFoundException("Elementary with code: " + command.getCode() + " not found in draft: " + command.getDraftId()));

repository.load(elementaryStation.getStationId())

.execute(sa -> sa.handle(new ChangeStationMainDataCommand(elementaryStation.getStationId(),
command.getDraftId(), elementaryStation.getLevel(), elementaryStation.getCode(),
command.getLongDesc(), command.getShortDesc(), command.getMappingOneToOne())));
}
}
}

`
Up my CommandHandler

Hi Marco,

The Test Fixtures solution Axon Framework provides is meant to test a single Aggregate.
Thus, a more high over, integration test of a component hitting several Aggregate types/instances, is currently not provided by the framework.

We have an outstanding issue to discuss something like you’re requesting, which you can find here.
For now though, the simple answer of “no, you’d have to build this yourself” is the only thing I can give you.

Cheers,
Steven

Thanks . I just read thread related issue and i igree with the base concept of DDD