diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2008-12-09 20:45:16 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2008-12-09 20:45:16 +0000 |
commit | 331d75a93a6f83444b5d295c1697d6e707c19d46 (patch) | |
tree | caee2201bed2c1c616acc70e0b52f5b52a68d23b /test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java | |
parent | 690b5fa412f7e98f5e5e342d5879aaf4fda02922 (diff) | |
download | jitsi-331d75a93a6f83444b5d295c1697d6e707c19d46.zip jitsi-331d75a93a6f83444b5d295c1697d6e707c19d46.tar.gz jitsi-331d75a93a6f83444b5d295c1697d6e707c19d46.tar.bz2 |
Eliminates duplication of ProtocolProviderService.getOperationSet() and .getSupportedOperationSets() for all protocol implementations by moving the implementations into AbstractProtocolProviderService. Uses .getOperationSet() instead of .getSupportedOperationSets() where appropriate in order to produce less garbage (due to Hashtable cloning).
Diffstat (limited to 'test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java')
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java b/test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java index bc04f2f..6c6b6b8 100644 --- a/test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java +++ b/test/net/java/sip/communicator/slick/protocol/gibberish/TestProtocolProviderServiceGibberishImpl.java @@ -145,20 +145,19 @@ public class TestProtocolProviderServiceGibberishImpl */ public void testOperationSetTypes() throws Exception { - Map supportedOperationSets - = fixture.provider1.getSupportedOperationSets(); + Map<String, OperationSet> supportedOperationSets = + fixture.provider1.getSupportedOperationSets(); - //make sure that keys (which are supposed to be class names) correspond - //what the class of the values recorded against them. - Iterator setNames = supportedOperationSets.keySet().iterator(); - while (setNames.hasNext()) + // make sure that keys (which are supposed to be class names) correspond + // what the class of the values recorded against them. + for (Map.Entry<String, OperationSet> entry : supportedOperationSets + .entrySet()) { - String setName = (String) setNames.next(); - Object opSet = supportedOperationSets.get(setName); + String setName = entry.getKey(); + Object opSet = entry.getValue(); - assertTrue(opSet + " was not an instance of " - + setName + " as declared" - , Class.forName(setName).isInstance(opSet)); + assertTrue(opSet + " was not an instance of " + setName + + " as declared", Class.forName(setName).isInstance(opSet)); } } |