Code example for CodeSource

Methods: equals

0
     */ 
    public void testEqualsObject_03() { 
        Certificate cert0 = new TestCertUtils.TestCertificate();
        Certificate[] certs0 = new Certificate[] { cert0, null };
        Certificate[] certs1 = new Certificate[] { null, cert0 };
        CodeSource thiz = new CodeSource(urlSite, certs0);
        CodeSource that = new CodeSource(urlSite, certs1);
        assertTrue(thiz.equals(that));
    } 
 
    /** 
     * Test for equals(Object)<br> 
     * Checks that both 'null' and not-null certs are taken into account - properly.  
     */ 
    public void testEqualsObject_05() { 
        Certificate cert0 = new TestCertUtils.TestCertificate("cert0");
        Certificate cert1 = new TestCertUtils.TestCertificate("cert1");
        Certificate cert2 = new TestCertUtils.TestCertificate("cert2");
 
        Certificate[] smallSet = new Certificate[] { cert0, cert1 };
        Certificate[] bigSet = new Certificate[] { cert0, cert1, cert2 };