Back to project page PhotoPicker.
The source code is released under:
GNU General Public License
If you think the Android project PhotoPicker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.thuytrinh.photopicker.model; // w ww.j a v a 2 s.c om import android.os.Parcel; import junit.framework.TestCase; import static org.assertj.core.api.Assertions.assertThat; public class PhotoTest extends TestCase { public void testShouldParcelProperly() { Photo originalPhoto = new Photo(); originalPhoto.setId(123L); originalPhoto.setAlbumId(456L); originalPhoto.setPath("Earth/Asia/AwesomePhotoChooser"); Parcel parcel = Parcel.obtain(); originalPhoto.writeToParcel(parcel, 0); parcel.setDataPosition(0); Photo parcelledPhoto = Photo.CREATOR.createFromParcel(parcel); assertThat(parcelledPhoto) .isNotNull() .isEqualToComparingFieldByField(originalPhoto); } }