Package org.fao.geonet.domain.responses

Examples of org.fao.geonet.domain.responses.UserList


        final ServiceContext serviceContext = createServiceContext();
        UserSession userSession = new UserSession();
        userSession.loginAs(editor);
        serviceContext.setUserSession(userSession);
        final UserList response = listService.exec();

        java.util.List<JAXBElement<? extends User>> records = response.getUsers();
        assertEquals("Expected to find a record.", 1, records.size());

        User user = records.get(0).getValue();

        assertEquals("record/username", editor.getUsername(), user.getUsername());
View Full Code Here


        _userRepo.save(UserRepositoryTest.newUser(inc));

        final ServiceContext serviceContext = createServiceContext();
        loginAsAdmin(serviceContext);

        final UserList response = listService.exec();

        java.util.List<?> records = response.getUsers();
        assertEquals("Expected to find 3 records", 3, records.size());
    }
View Full Code Here

        final ServiceContext serviceContext = createServiceContext();
        UserSession userSession = new UserSession();
        userSession.loginAs(user1);

        serviceContext.setUserSession(userSession);
        final UserList response = listService.exec();

        java.util.List<?> records = response.getUsers();
        assertEquals("Expected to find 2 records. ", 2, records.size());
    }
View Full Code Here

                if (!profileSet.contains(profile.name())) {
                    usersToRemove.add(user.getId());
                }
            }
        }
        UserList res = new UserList();

        for (User u : Collections.unmodifiableList(all)) {
            if (!usersToRemove.contains(u.getId())) {
                res.addUser(u);
            }
        }


        return res;
View Full Code Here

TOP

Related Classes of org.fao.geonet.domain.responses.UserList

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.