{
if (support)
{
- Assert.IsNotNull(externalStorage, "PRECONDITION: Failed to get external storage for testing.");
-
- // TEST CODE
- try
+ if (externalStorage != null)
{
- externalStorage.GetAbsolutePath(DirectoryType.Ringtones);
- Assert.IsTrue(false, "this operation should raise NotSupportedException exception");
+ try
+ {
+ externalStorage.GetAbsolutePath(DirectoryType.Ringtones);
+ Assert.IsTrue(false, "this operation should raise NotSupportedException exception");
+ }
+ catch (Exception ex)
+ {
+ Assert.IsTrue(ex.GetType() == typeof(ArgumentException), "this operation should raise ArgumentException exception");
+ }
}
- catch (Exception ex)
+ else
{
- Assert.IsTrue(ex.GetType() == typeof(ArgumentException), "this operation should raise ArgumentException exception");
+ Assert.Pass("Test skipped! The external storage is removed");
}
}
else