mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-25 15:52:06 +01:00
Correct method name to getUndecidedDevices
This commit is contained in:
parent
9d63baf55a
commit
419f6a336e
2 changed files with 13 additions and 13 deletions
|
@ -35,20 +35,20 @@ public class UndecidedOmemoIdentityException extends Exception {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the HashSet of untrusted devices.
|
* Return the HashSet of undecided devices.
|
||||||
*
|
*
|
||||||
* @return untrusted devices
|
* @return undecided devices
|
||||||
*/
|
*/
|
||||||
public HashSet<OmemoDevice> getUntrustedDevices() {
|
public HashSet<OmemoDevice> getUndecidedDevices() {
|
||||||
return this.devices;
|
return this.devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add all untrusted devices of another Exception to this Exceptions HashSet of untrusted devices.
|
* Add all undecided devices of another Exception to this Exceptions HashSet of undecided devices.
|
||||||
*
|
*
|
||||||
* @param other other Exception
|
* @param other other Exception
|
||||||
*/
|
*/
|
||||||
public void join(UndecidedOmemoIdentityException other) {
|
public void join(UndecidedOmemoIdentityException other) {
|
||||||
this.devices.addAll(other.getUntrustedDevices());
|
this.devices.addAll(other.getUndecidedDevices());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,18 +45,18 @@ public class OmemoExceptionsTest {
|
||||||
OmemoDevice mallory = new OmemoDevice(JidCreate.bareFrom("mallory@server.tld"), 9876);
|
OmemoDevice mallory = new OmemoDevice(JidCreate.bareFrom("mallory@server.tld"), 9876);
|
||||||
|
|
||||||
UndecidedOmemoIdentityException u = new UndecidedOmemoIdentityException(alice);
|
UndecidedOmemoIdentityException u = new UndecidedOmemoIdentityException(alice);
|
||||||
assertTrue(u.getUntrustedDevices().contains(alice));
|
assertTrue(u.getUndecidedDevices().contains(alice));
|
||||||
assertTrue(u.getUntrustedDevices().size() == 1);
|
assertTrue(u.getUndecidedDevices().size() == 1);
|
||||||
|
|
||||||
UndecidedOmemoIdentityException v = new UndecidedOmemoIdentityException(bob);
|
UndecidedOmemoIdentityException v = new UndecidedOmemoIdentityException(bob);
|
||||||
v.getUntrustedDevices().add(mallory);
|
v.getUndecidedDevices().add(mallory);
|
||||||
assertTrue(v.getUntrustedDevices().size() == 2);
|
assertTrue(v.getUndecidedDevices().size() == 2);
|
||||||
assertTrue(v.getUntrustedDevices().contains(bob));
|
assertTrue(v.getUndecidedDevices().contains(bob));
|
||||||
assertTrue(v.getUntrustedDevices().contains(mallory));
|
assertTrue(v.getUndecidedDevices().contains(mallory));
|
||||||
|
|
||||||
u.getUntrustedDevices().add(bob);
|
u.getUndecidedDevices().add(bob);
|
||||||
u.join(v);
|
u.join(v);
|
||||||
assertTrue(u.getUntrustedDevices().size() == 3);
|
assertTrue(u.getUndecidedDevices().size() == 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue