ContentProvider can now lookup tracks via UUID.

This commit is contained in:
Dennis Guse
2020-08-15 08:45:00 +02:00
parent c26a5edc03
commit 5c96774e79
6 changed files with 52 additions and 5 deletions
@@ -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)}
*/