Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-10-27 18:29:38 -0400
committerRyan D. Brooks2015-10-27 18:29:38 -0400
commitdc47c797352105c565edc4d8ab45b42f9c2d2fd5 (patch)
tree5e48ab487e93bc2e8272083a09912247deab9776 /plugins/org.eclipse.osee.ats.core.test
parented2737a24833e061cbb8b3dcd6d5b3c8af0ae09c (diff)
downloadorg.eclipse.osee-dc47c797352105c565edc4d8ab45b42f9c2d2fd5.tar.gz
org.eclipse.osee-dc47c797352105c565edc4d8ab45b42f9c2d2fd5.tar.xz
org.eclipse.osee-dc47c797352105c565edc4d8ab45b42f9c2d2fd5.zip
refactor: Provide default method Named.compareTo()
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core.test')
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java24
1 files changed, 1 insertions, 23 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java
index b70abeff77..89e5c7e7a0 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java
@@ -150,27 +150,10 @@ public class CoreAtsUsersTest {
Assert.assertFalse(user2.equals(exceptionUser));
}
- @Test
- public void testCompareTo() {
- Assert.assertEquals(-8, AtsCoreUsers.GUEST_USER.compareTo(AtsCoreUsers.SYSTEM_USER));
- Assert.assertEquals(1, AtsCoreUsers.GUEST_USER.compareTo(null));
- Assert.assertEquals(-1, AtsCoreUsers.GUEST_USER.compareTo("asdf"));
-
- TestUser user = new TestUser();
- user.setName(null);
- Assert.assertEquals(1, AtsCoreUsers.GUEST_USER.compareTo(user));
- Assert.assertEquals(-1, user.compareTo(AtsCoreUsers.GUEST_USER));
- Assert.assertEquals(0, user.compareTo(user));
- }
-
private class TestUser extends AbstractAtsUser {
private String name = "Test User";
-
- public void setName(String name) {
- this.name = name;
- }
-
+
public TestUser() {
super("999994");
}
@@ -209,11 +192,6 @@ public class CoreAtsUsersTest {
}
@Override
- public int compareTo(Object o) {
- return 0;
- }
-
- @Override
public String getEmail() {
return getName();
}

Back to the top