Package org.nxplanner.domain

Examples of org.nxplanner.domain.Person


        context.setProjectId(PROJECT_ID);
    }

    private void setUpMockQuery() {
        ArrayList results = new ArrayList();
        person1 = new Person();
        person1.setId(22);
        person1.setName("XYZ");
        person1.setUserId("userId1");
        results.add(person1);
        person2 = new Person();
        person2.setId(33);
        person2.setName("ABC");
        person2.setUserId("userId2");
        results.add(person2);
        support.hibernateSession.findReturn = results;
View Full Code Here


        context.setProjectId(PROJECT_ID);
    }

    private void setUpMockQuery() {
        ArrayList results = new ArrayList();
        person1 = new Person();
        person1.setId(22);
        person1.setName("XYZ");
        person1.setUserId("userId1");
        results.add(person1);
        person2 = new Person();
        person2.setId(33);
        person2.setName("ABC");
        person2.setUserId("userId2");
        results.add(person2);
        support.hibernateSession.findReturn = results;
View Full Code Here

    protected abstract AbstractSecurityFilter getSecurityFilter();

    protected void setUpSubject() {
        subject = new Subject();
        subject.getPrincipals().add(new PersonPrincipal(new Person("xyz")));
        SecurityHelper.setSubject(support.request, subject);
    }
View Full Code Here

import org.nxplanner.domain.Person;

public class PersonIdDecorator {
    public static String getPersonName(int id) {
        if (id <= 0) return "";
        Person person = getPerson(id);
        return person == null ? "" : person.getName();
    }
View Full Code Here

        super.tearDown();
        properties.clear();
    }

    public void testSuccessfulLogin() throws Exception {
        Person person = new Person("foo");
        support.hibernateSession.find2Return = new ArrayList();
        support.hibernateSession.find2Return.add(person);
        MockLoginModule mockLoginModule = (MockLoginModule)authenticator.getLoginModule();
        assertNotNull(mockLoginModule);
        mockLoginModule.authenticateReturn = new Subject();
View Full Code Here

        assertFalse("unnecessary logout", mockLoginModule.logoutCalled);
        assertTrue(SecurityHelper.isUserAuthenticated(support.request));
    }

    public void testSuccessfulLoginWhenAlreadyLoggedIn() throws Exception {
        Person person = new Person("foo");
        support.hibernateSession.find2Return = new ArrayList();
        support.hibernateSession.find2Return.add(person);
        MockLoginModule mockLoginModule = (MockLoginModule)authenticator.getLoginModule();
        assertNotNull(mockLoginModule);
        mockLoginModule.authenticateReturn = new Subject();
View Full Code Here

TOP

Related Classes of org.nxplanner.domain.Person

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.