@@ -0,0 +1,1382 @@
+package com.jakewharton.trakt.services;%0A%0Aimport com.jakewharton.apibuilder.ApiException;%0Aimport com.jakewharton.trakt.BaseTestCase;%0A%0Apublic class AccountServiceTest extends BaseTestCase %7B%0A%09/*%0A%09//XXX: This requires a developer API key.%0A%09public void test_create() %7B%0A%09%09try %7B%0A%09%09%09getManager().accountService().create(%22JakeWharton%22, %22zomg secret password%22, %22jakewharton@gmail.com%22).fire();%0A%09%09%09fail(%22Account creation of duplicate user succeeded.%22);%0A%09%09%7D catch (ApiException e) %7B%0A%09%09%09assertEquals(%22Exception text does not match.%22, %22%7B%5C%22status%5C%22:%5C%22failure%5C%22,%5C%22error%5C%22:%5C%22JakeWharton is already a registered username%5C%22%7D%22, e.getMessage().trim());%0A%09%09%09%0A%09%09%09//TODO: change this to a custom error that includes a response we%0A%09%09%09//can actually test against to differentiate between a problem with%0A%09%09%09//the API or simply a failed creation.%0A%09%09%7D%0A%09%7D%0A%09*/%0A%09%0A%09public void test_test() %7B%0A%09%09try %7B%0A%09%09%09getManager().accountService().test(%22JakeWharton%22, %22this is not my real password SHA!%22).fire();%0A%09%09%09fail(%22Account test did not throw exception.%22);%0A%09%09%7D catch (ApiException e) %7B%0A%09%09%09assertEquals(%22Exception text does not match.%22, %22%7B%5C%22status%5C%22:%5C%22failure%5C%22,%5C%22error%5C%22:%5C%22failed authentication%5C%22%7D%22, e.getMessage().trim());%0A%09%09%09%0A%09%09%09//TODO: change this to a custom error that includes a response we%0A%09%09%09//can actually test against to differentiate between a problem with%0A%09%09%09//the API or simply a failed authentication.%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add account service tests.