Code example for SecurityPermission

Methods: getName, getActions

0
        ) 
    }) 
    public void testCtor() 
    { 
        String name = "basic123*$%#";
        SecurityPermission test = new SecurityPermission(name);
        assertEquals(name, test.getName());
        assertEquals("", test.getActions());
        test = new SecurityPermission(name, "#$!#12435");
        assertEquals(name, test.getName());
        assertEquals("", test.getActions());
        try{ 
            new SecurityPermission(null);
            fail("NPE is not thrown");
        } 
        catch (NullPointerException ok){}
         
        try{ 
            new SecurityPermission(null, "ds235");
            fail("NPE is not thrown");
Stop searching for code, let great code find you!  Add Codota to your java IDE