|
|
@ -112,7 +112,7 @@ public class ListMemberTest extends TestCase { |
|
|
|
public void testSafeMap() { |
|
|
|
public void testSafeMap() { |
|
|
|
var user = new User("email","name","salt","hash",0); |
|
|
|
var user = new User("email","name","salt","hash",0); |
|
|
|
var lm = new ListMember(null,user,ListMember.STATE_AWAITING_CONFIRMATION,"token"); |
|
|
|
var lm = new ListMember(null,user,ListMember.STATE_AWAITING_CONFIRMATION,"token"); |
|
|
|
assertEquals(Map.of(EMAIL,"email",NAME,"name",STATE,"awaiting confirmation"),lm.safeMap()); |
|
|
|
assertEquals(Map.of(EMAIL,"email",NAME,"name",STATE,"erwartet Bestätigung"),lm.safeMap()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void testStateText() { |
|
|
|
public void testStateText() { |
|
|
@ -121,10 +121,10 @@ public class ListMemberTest extends TestCase { |
|
|
|
var mod = new ListMember(null,null,ListMember.STATE_MODERATOR,null); |
|
|
|
var mod = new ListMember(null,null,ListMember.STATE_MODERATOR,null); |
|
|
|
var await = new ListMember(null,null,ListMember.STATE_AWAITING_CONFIRMATION,null); |
|
|
|
var await = new ListMember(null,null,ListMember.STATE_AWAITING_CONFIRMATION,null); |
|
|
|
|
|
|
|
|
|
|
|
assertEquals("subscriber",guest.stateText()); |
|
|
|
assertEquals("Abonniert",guest.stateText()); |
|
|
|
assertEquals("moderator, owner, subscriber",owner.stateText()); |
|
|
|
assertEquals("Abonniert, Besitzer, Moderator",owner.stateText()); |
|
|
|
assertEquals("moderator, subscriber",mod.stateText()); |
|
|
|
assertEquals("Abonniert, Moderator",mod.stateText()); |
|
|
|
assertEquals("awaiting confirmation",await.stateText()); |
|
|
|
assertEquals("erwartet Bestätigung",await.stateText()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void testToken() { |
|
|
|
public void testToken() { |
|
|
|