Package org.apache.aries.jmx.codec

Examples of org.apache.aries.jmx.codec.RoleData


        }
        Role role = userAdmin.getRole(name);
        if (role == null) {
            return null;
        }
        return new RoleData(role).toCompositeData();
    }
View Full Code Here


        Mockito.when(user1.getType()).thenReturn(Role.USER);
        Mockito.when(user1.getName()).thenReturn("user1");
        Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(user1);
        CompositeData data = mbean.getRole("user1");
        Assert.assertNotNull(data);
        RoleData role = RoleData.from(data);
        Assert.assertNotNull(role);
        Assert.assertEquals("user1", role.getName());
        Assert.assertEquals(Role.USER, role.getType());
        Mockito.verify(userAdmin).getRole(Mockito.anyString());
    }
View Full Code Here

        }
        Role role = userAdmin.getRole(name);
        if (role == null) {
            return null;
        }
        return new RoleData(role).toCompositeData();
    }
View Full Code Here

    public CompositeData getRole(String name) throws IOException {
        Role role = userAdmin.getRole(name);
        if (role == null) {
            return null;
        }
        return new RoleData(role).toCompositeData();
    }
View Full Code Here

        Mockito.when(user1.getType()).thenReturn(Role.USER);
        Mockito.when(user1.getName()).thenReturn("user1");
        Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(user1);
        CompositeData data = mbean.getRole("user1");
        Assert.assertNotNull(data);
        RoleData role = RoleData.from(data);
        Assert.assertNotNull(role);
        Assert.assertEquals("user1", role.getName());
        Assert.assertEquals(Role.USER, role.getType());
        Mockito.verify(userAdmin).getRole(Mockito.anyString());
    }
View Full Code Here

        Mockito.when(user1.getType()).thenReturn(Role.USER);
        Mockito.when(user1.getName()).thenReturn("user1");
        Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(user1);
        CompositeData data = mbean.getRole("user1");
        Assert.assertNotNull(data);
        RoleData role = RoleData.from(data);
        Assert.assertNotNull(role);
        Assert.assertEquals("user1", role.getName());
        Assert.assertEquals(Role.USER, role.getType());
        Mockito.verify(userAdmin).getRole(Mockito.anyString());
    }
View Full Code Here

        }
        Role role = userAdmin.getRole(name);
        if (role == null) {
            return null;
        }
        return new RoleData(role).toCompositeData();
    }
View Full Code Here

        Mockito.when(user1.getType()).thenReturn(Role.USER);
        Mockito.when(user1.getName()).thenReturn("user1");
        Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(user1);
        CompositeData data = mbean.getRole("user1");
        Assert.assertNotNull(data);
        RoleData role = RoleData.from(data);
        Assert.assertNotNull(role);
        Assert.assertEquals("user1", role.getName());
        Assert.assertEquals(Role.USER, role.getType());
        Mockito.verify(userAdmin).getRole(Mockito.anyString());
    }
View Full Code Here

    public CompositeData getRole(String name) throws IOException {
        Role role = userAdmin.getRole(name);
        if (role == null) {
            return null;
        }
        return new RoleData(role).toCompositeData();
    }
View Full Code Here

        Mockito.when(user1.getType()).thenReturn(Role.USER);
        Mockito.when(user1.getName()).thenReturn("user1");
        Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(user1);
        CompositeData data = mbean.getRole("user1");
        Assert.assertNotNull(data);
        RoleData role = RoleData.from(data);
        Assert.assertNotNull(role);
        Assert.assertEquals("user1", role.getName());
        Assert.assertEquals(Role.USER, role.getType());
        Mockito.verify(userAdmin).getRole(Mockito.anyString());
    }
View Full Code Here

TOP

Related Classes of org.apache.aries.jmx.codec.RoleData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.