// ==================================================================
// Do the test.
// ==================================================================
DefaultResourceMigratorBuilder builder =
new DefaultResourceMigratorBuilder(mockCoreFactory,
mockIdentificationFactory, mockStreamMigratorFactory,
mockGraphFactory, mockRecogniserFactory,
mockStreamBufferFactory, mockNotificationReporter);
builder.setTarget(mockTargetVersion);
{
builder.startType("custom type");
builder.setCustomPathRecogniser(mockPathRecogniser);
builder.addCustomContentRecogniser(mockContentVersion1,
mockContentRecogniser1);
builder.addCustomContentRecogniser(mockContentVersion2,
mockContentRecogniser2);
builder.endType();
}
{
builder.startType("regexp type");
builder.setRegexpPathRecogniser("path re");
builder.addRegexpContentRecogniser(mockContentVersion1,
"content re 1");
builder.addRegexpContentRecogniser(mockContentVersion2,
"content re 2");
builder.endType();
}
ResourceMigrator resourceMigrator =
builder.getCompletedResourceMigrator();
assertSame("", mockResourceMigrator, resourceMigrator);
}