use of org.datatransferproject.auth.microsoft.harness.AuthTestDriver in project data-transfer-project by google.
the class LocalImportTestRunner method main.
@SuppressWarnings("unchecked")
public static void main(String... args) throws Exception {
AuthTestDriver authTestDriver = new AuthTestDriver();
MicrosoftTransferExtension serviceProvider = new MicrosoftTransferExtension();
TokenAuthData token = authTestDriver.getOAuthTokenCode();
Importer<TokenAuthData, ContactsModelWrapper> contacts = (Importer<TokenAuthData, ContactsModelWrapper>) serviceProvider.getImporter("CONTACTS");
ContactsModelWrapper wrapper = new ContactsModelWrapper(createCards());
FakeIdempotentImportExecutor executor = new FakeIdempotentImportExecutor();
ImportResult result = contacts.importItem(UUID.randomUUID(), executor, token, wrapper);
}
use of org.datatransferproject.auth.microsoft.harness.AuthTestDriver in project data-transfer-project by google.
the class LocalExportTestRunner method main.
@SuppressWarnings("unchecked")
public static void main(String... args) throws Exception {
AuthTestDriver authTestDriver = new AuthTestDriver();
MicrosoftTransferExtension serviceProvider = new MicrosoftTransferExtension();
TokenAuthData token = authTestDriver.getOAuthTokenCode();
Exporter<TokenAuthData, ContactsModelWrapper> contacts = (Exporter<TokenAuthData, ContactsModelWrapper>) serviceProvider.getExporter("CONTACTS");
ExportResult<ContactsModelWrapper> wrapper = contacts.export(UUID.randomUUID(), token, Optional.empty());
}
Aggregations