comparaison-java-mongodb-mysql/RealmCLI/src/test/java/ljug/control/ServiceControleTest.java
/**
     * Test of addUser method, of class ServiceControle.
     */
Test of addUser method, of class ServiceControle.
Test of addUser method of class ServiceControle .
@org.junit.Test
    public void testAny() {
        EntityManagerFactory emf
                = Persistence.createEntityManagerFactory("REALMPU");
        Services service = ServiceFactory.ServicesBuilder(emf);
        service.addUser("pascal", "pascal", null);
        assertNotNull(service.getUser("pascal"));
        service.rmUser("pascal");
        assertNull(service.getUser("pascal"));
        service.addRole("admin");
        assertNotNull(service.getRole("admin"));
        service.rmtRole("admin");
        assertNull(service.getRole("admin"));
        /*
        service.associate("pascal", "admin");
        service.associate("pascal", "prof");
        service.associate("pascal1", "prof");
        service.dessociate("pascal1", "prof");
        service.rmUser("pascal");
        */
    }
@ org . junit . Test public void testAny ( ) { EntityManagerFactory emf = Persistence . createEntityManagerFactory ( "REALMPU" ) ; Services service = ServiceFactory . ServicesBuilder ( emf ) ; service . addUser ( "pascal" , "pascal" , null ) ; assertNotNull ( service . getUser ( "pascal" ) ) ; service . rmUser ( "pascal" ) ; assertNull ( service . getUser ( "pascal" ) ) ; service . addRole ( "admin" ) ; assertNotNull ( service . getRole ( "admin" ) ) ; service . rmtRole ( "admin" ) ; assertNull ( service . getRole ( "admin" ) ) ; /*
        service.associate("pascal", "admin");
        service.associate("pascal", "prof");
        service.associate("pascal1", "prof");
        
        service.dessociate("pascal1", "prof");
        
        service.rmUser("pascal");
        */ }
Test of addUser method, of class ServiceControle.
Test of addUser method of class ServiceControle .