Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-05-25 09:55:23 -0400
committerAngel Avila2016-05-25 09:55:23 -0400
commitc3cafba89b7d841899f53ca46d804ed3d6894cac (patch)
tree9041947da278f0a4c1d6ccda6ca57a3bf77c8251 /plugins/org.eclipse.osee.account.rest.test
parent699a71cbf1f62837fc2d21714c6e667972def643 (diff)
downloadorg.eclipse.osee-c3cafba89b7d841899f53ca46d804ed3d6894cac.tar.gz
org.eclipse.osee-c3cafba89b7d841899f53ca46d804ed3d6894cac.tar.xz
org.eclipse.osee-c3cafba89b7d841899f53ca46d804ed3d6894cac.zip
refactor: Use valueOf to create artifact ids
Diffstat (limited to 'plugins/org.eclipse.osee.account.rest.test')
-rw-r--r--plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java
index 88b44e6ad0..0e1d3813b6 100644
--- a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java
+++ b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java
@@ -224,21 +224,19 @@ public class AccountOpsTest {
@Test
public void testGetAccountData() {
- ArtifactId artId = ArtifactId.valueOf(456);
- Account account = mockAccount(artId, "DEF", "acc2", "acc2@email.com", "u2", true);
+ Account account = mockAccount(ArtifactId.valueOf(456L), "DEF", "acc2", "acc2@email.com", "u2", true);
ResultSet<Account> accounts = ResultSets.singleton(account);
when(accountAdmin.getAccountById(ACCOUNT_UID)).thenReturn(accounts);
AccountInfoData actual = ops.getAccountData(ACCOUNT_UID);
- assertAccount(actual, artId, "DEF", "acc2", "acc2@email.com", "u2", true);
+ assertAccount(actual, ArtifactId.valueOf(456L), "DEF", "acc2", "acc2@email.com", "u2", true);
verify(accountAdmin).getAccountById(ACCOUNT_UID);
}
@Test
public void testGetAccountDetailsData() {
- ArtifactId artId = ArtifactId.valueOf(789);
- Account account = mockAccount(artId, "GHI", "acc3", "acc3@email.com", "u3", true);
+ Account account = mockAccount(ArtifactId.valueOf(789L), "GHI", "acc3", "acc3@email.com", "u3", true);
Map<String, String> map = new HashMap<>();
map.put("a", "1");
map.put("b", "2");
@@ -246,7 +244,7 @@ public class AccountOpsTest {
AccountPreferences preferences = mock(AccountPreferences.class);
when(preferences.asMap()).thenReturn(map);
- when(preferences.getId()).thenReturn(artId.getId());
+ when(preferences.getId()).thenReturn(ArtifactId.valueOf(789L).getId());
when(account.getPreferences()).thenReturn(preferences);
ResultSet<Account> accounts = ResultSets.singleton(account);
@@ -254,7 +252,7 @@ public class AccountOpsTest {
AccountDetailsData actual = ops.getAccountDetailsData(ACCOUNT_UID);
- assertAccount(actual, artId, "GHI", "acc3", "acc3@email.com", "u3", true);
+ assertAccount(actual, ArtifactId.valueOf(789L), "GHI", "acc3", "acc3@email.com", "u3", true);
AccountPreferencesData actualPrefs = actual.getPreferences();
Map<String, String> actualMap = actualPrefs.getMap();

Back to the top