[Tests] Avoid NRE in MediaItemTest.DefaultValues test
https://bugzilla.xamarin.com/show_bug.cgi?id=49978 MPMediaQuery.Item will be null if Media Library privacy access dialog is not granted
This commit is contained in:
Родитель
c267c5668c
Коммит
df9c52914d
|
@ -29,6 +29,8 @@ namespace MonoTouchFixtures.MediaPlayer {
|
||||||
|
|
||||||
using (var q = new MPMediaQuery ()) {
|
using (var q = new MPMediaQuery ()) {
|
||||||
var items = q.Items;
|
var items = q.Items;
|
||||||
|
if (items == null)
|
||||||
|
Assert.Inconclusive ("This test needs media library privacy permission to be executed.");
|
||||||
if (items.Length == 0)
|
if (items.Length == 0)
|
||||||
Assert.Inconclusive ("This test needs music in the music library on the device.");
|
Assert.Inconclusive ("This test needs music in the music library on the device.");
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче