use of org.neo4j.pushtocloud.PushToCloudCommand.DumpCreator in project neo4j by neo4j.
the class PushToCloudCommandTest method shouldAcceptDatabaseNameAsSource.
@Test
public void shouldAcceptDatabaseNameAsSource() throws Exception {
// given
Copier targetCommunicator = mockedTargetCommunicator();
DumpCreator dumpCreator = mockedDumpCreator();
PushToCloudCommand command = command().copier(targetCommunicator).dumpCreator(dumpCreator).build();
// when
String databaseName = DBNAME;
String[] args = { "--database", databaseName, "--bolt-uri", SOME_EXAMPLE_BOLT_URI };
new CommandLine(command).execute(args);
// then
verify(dumpCreator).dumpDatabase(eq(databaseName), any());
verify(targetCommunicator).checkSize(anyBoolean(), any(), anyLong(), any());
verify(targetCommunicator).copy(anyBoolean(), any(), any(), any(), eq(true), any());
}
Aggregations