Code example for Provider

Methods: getServicesremovegetProperty

0
 
    /* 
     * Class under test for Object remove(Object) 
     */ 
    public final void testRemoveObject() { 
        Object o = p.remove("MessageDigest.SHA-1");
 
        assertEquals("SomeClassName", o);
        assertNull(p.getProperty("MessageDigest.SHA-1"));
        assertEquals(1, p.getServices().size());
    } 
 
    public final void testService1() { 
        p.put("MessageDigest.SHA-1", "AnotherClassName");
        Provider.Service s = p.getService("MessageDigest", "SHA-1");
        assertEquals("AnotherClassName", s.getClassName());
    } 
 
    public final void testGetServiceCaseSensitivity() { 
        p.put("i.I", "foo");