mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
ContentProvider can now lookup tracks via UUID.
This commit is contained in:
+18
-1
@@ -384,12 +384,29 @@ public class CustomContentProviderUtilsTest {
|
||||
* Tests the method {@link ContentProviderUtils#getTrack(long)}
|
||||
*/
|
||||
@Test
|
||||
public void testGetTrack() {
|
||||
public void testGetTrack_by_id() {
|
||||
// given
|
||||
long trackId = System.currentTimeMillis();
|
||||
contentProviderUtils.insertTrack(TestDataUtil.createTrack(trackId));
|
||||
|
||||
// when / then
|
||||
Assert.assertNotNull(contentProviderUtils.getTrack(trackId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link ContentProviderUtils#getTrack(long)}
|
||||
*/
|
||||
@Test
|
||||
public void testGetTrack_by_uuid() {
|
||||
// given
|
||||
long trackId = System.currentTimeMillis();
|
||||
Track track = TestDataUtil.createTrack(trackId);
|
||||
contentProviderUtils.insertTrack(track);
|
||||
|
||||
// when / then
|
||||
Assert.assertNotNull(contentProviderUtils.getTrack(track.getUuid()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link ContentProviderUtils#updateTrack(Track)}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user