Package org.apache.isis.core.testsupport.testdomain

Examples of org.apache.isis.core.testsupport.testdomain.Person


        return "";
    }

    @Override
    public ObjectAdapter get(final ObjectAdapter fromObject) {
        final Person director = getMovie(fromObject).getDirector();
        if (director == null) {
            return null;
        } else {
            return getAdapterManager().adapterFor(director);
        }
View Full Code Here


        return true;
    }

    @Override
    public Object newInstance() {
        return new Person();
    }
View Full Code Here

        system = new TestProxySystemII();
        system.init();

        persistor = new ObjectFixtureFilePersistor();

        person = new Person();
        person.setName("Fred Smith");
        person.setDate(new Date(110, 2, 8, 0, 0));

    }
View Full Code Here

    public void saveTwoObjects() throws Exception {
        final Set<Object> objects = new AbstractSet<Object>() {
            @Override
            public Iterator<Object> iterator() {
                final List<Object> list = new ArrayList<Object>();
                final Person person = new Person();
                person.setName("Fred Smith");
                person.setDate(new Date(110, 2, 8, 0, 0));
                list.add(person);
                list.add(new Person());
                return list.iterator();
            }

            @Override
            public int size() {
View Full Code Here

        Assert.assertEquals(new Date(110, 2, 8, 13, 32), ((Person) object).getDate());
    }

    @Test
    public void saveObjectAddedToList() throws Exception {
        final Person person = new Person();
        person.setName("Fred Smith");
        person.setDate(new Date(110, 2, 8, 13, 32));
        final Movie movie = new Movie();
        movie.setDirector(person);
        movie.addToRoles(new Role());
        movie.addToRoles(new Role());
        service.save(movie);
View Full Code Here

        system = new TestProxySystemII();
        system.init();

        persistor = new ObjectFixtureFilePersistor();

        person = new Person();
        person.setName("Fred Smith");
        person.setDate(new Date(110, 2, 8, 0, 0));

    }
View Full Code Here

    public void saveTwoObjects() throws Exception {
        final Set<Object> objects = new AbstractSet<Object>() {
            @Override
            public Iterator<Object> iterator() {
                final List<Object> list = new ArrayList<Object>();
                final Person person = new Person();
                person.setName("Fred Smith");
                person.setDate(new Date(110, 2, 8, 0, 0));
                list.add(person);
                list.add(new Person());
                return list.iterator();
            }

            @Override
            public int size() {
View Full Code Here

        Assert.assertEquals(new Date(110, 2, 8, 13, 32), ((Person) object).getDate());
    }

    @Test
    public void saveObjectAddedToList() throws Exception {
        final Person person = new Person();
        person.setName("Fred Smith");
        person.setDate(new Date(110, 2, 8, 13, 32));
        final Movie movie = new Movie();
        movie.setDirector(person);
        movie.addToRoles(new Role());
        movie.addToRoles(new Role());
        service.save(movie);
View Full Code Here

        return "";
    }

    @Override
    public ObjectAdapter get(final ObjectAdapter fromObject) {
        final Person director = getMovie(fromObject).getDirector();
        if (director == null) {
            return null;
        } else {
            return getAdapterManager().adapterFor(director);
        }
View Full Code Here

        return true;
    }

    @Override
    public Object newInstance() {
        return new Person();
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.testsupport.testdomain.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.