Package org.socialmusicdiscovery.server.business.model.core

Examples of org.socialmusicdiscovery.server.business.model.core.Recording


    @Test
    public void testFind() {
        em.clear();
        Collection<RecordingEntity> recordings = recordingRepository.findAll();
        assert recordings.size() == 4;
        Recording recording = recordings.iterator().next();
        assert !((PersistentCollection) recording.getContributors()).wasInitialized();
        assert recording.getWorks().iterator().next().getName().equals("I Will Always Love You");
        assert recording.getContributors().size() == 2;

        em.clear();
        recordings = recordingRepository.findAllWithRelations(Arrays.asList("works"), Arrays.asList("contributors"));
        assert recordings.size() == 4;
        recording = recordings.iterator().next();
        assert ((PersistentCollection) recording.getContributors()).wasInitialized();
        assert recording.getContributors().size() > 0;

        em.clear();
        recording = recordingRepository.findById(recordings.iterator().next().getId());
        assert recording != null;
    }
View Full Code Here

TOP

Related Classes of org.socialmusicdiscovery.server.business.model.core.Recording

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.