[MediaPlayer][TCSACR-284] change the error code 36/215436/1
authorruble <just.nam@samsung.com>
Tue, 8 Oct 2019 06:24:32 +0000 (15:24 +0900)
committerruble <just.nam@samsung.com>
Tue, 8 Oct 2019 06:24:32 +0000 (15:24 +0900)
Change-Id: I548246970a30fbca9935fc0b4526b86a9a4f1773

tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSAudioEffect.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSEqualizerBand.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSPlayer.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSPlayerTrackInfo.cs

index 828e635..8a9d9be 100755 (executable)
@@ -154,7 +154,7 @@ namespace Tizen.Multimedia.Tests
         public void Clear_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _audioEffect.Clear(), Throws.InvalidOperationException);
+            Assert.That(() => _audioEffect.Clear(), Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -180,7 +180,7 @@ namespace Tizen.Multimedia.Tests
         public void this_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _audioEffect[0], Throws.InvalidOperationException);
+            Assert.That(() => _audioEffect[0], Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -193,7 +193,7 @@ namespace Tizen.Multimedia.Tests
         public void Count_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _audioEffect.Count, Throws.InvalidOperationException);
+            Assert.That(() => _audioEffect.Count, Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -206,20 +206,7 @@ namespace Tizen.Multimedia.Tests
         public void BandLevelRange_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _audioEffect.BandLevelRange, Throws.InvalidOperationException);
-        }
-
-        [Test]
-        [Category("P2")]
-        [Description("IsAvailable throws exception if an audio offload is enabled")]
-        [Property("SPEC", "Tizen.Multimedia.AudioEffect.IsAvailable A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PEX")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public void IsAvailable_THROWS_IF_AUDIOOFFLOAD_ENABLED()
-        {
-            SetAudioOffload();
-            Assert.That(() => _audioEffect.IsAvailable, Throws.InvalidOperationException);
+            Assert.That(() => _audioEffect.BandLevelRange, Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
index 6da6e40..3f9ba20 100755 (executable)
@@ -175,7 +175,7 @@ namespace Tizen.Multimedia.Tests
         public void Frequency_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _band.Frequency, Throws.InvalidOperationException);
+            Assert.That(() => _band.Frequency, Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -188,7 +188,7 @@ namespace Tizen.Multimedia.Tests
         public void FrequencyRange_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _band.FrequencyRange, Throws.InvalidOperationException);
+            Assert.That(() => _band.FrequencyRange, Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -201,7 +201,7 @@ namespace Tizen.Multimedia.Tests
         public void Level_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => _band.Level, Throws.InvalidOperationException);
+            Assert.That(() => _band.Level, Throws.TypeOf<NotAvailableException>());
         }
     }
 }
index 2bb26b6..4589c28 100755 (executable)
@@ -553,7 +553,7 @@ namespace Tizen.Multimedia.Tests
         public void ReplayGain_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => TestPlayer.ReplayGain = true, Throws.InvalidOperationException);
+            Assert.That(() => TestPlayer.ReplayGain = true, Throws.TypeOf<NotAvailableException>());
         }
         #endregion
 
@@ -661,9 +661,9 @@ namespace Tizen.Multimedia.Tests
         public void AudioLatencyMode_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Low, Throws.InvalidOperationException);
-            Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Mid, Throws.InvalidOperationException);
-            Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.High, Throws.InvalidOperationException);
+            Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Low, Throws.TypeOf<NotAvailableException>());
+            Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Mid, Throws.TypeOf<NotAvailableException>());
+            Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.High, Throws.TypeOf<NotAvailableException>());
         }
         #endregion
 
@@ -1729,7 +1729,7 @@ namespace Tizen.Multimedia.Tests
         public void SetPlaybackRate_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => TestPlayer.SetPlaybackRate(0.1F), Throws.InvalidOperationException);
+            Assert.That(() => TestPlayer.SetPlaybackRate(0.1F), Throws.TypeOf<NotAvailableException>());
         }
         #endregion
 
@@ -2436,7 +2436,7 @@ namespace Tizen.Multimedia.Tests
         public void AudioPitchEnabled_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => TestPlayer.AudioPitchEnabled = true, Throws.InvalidOperationException);
+            Assert.That(() => TestPlayer.AudioPitchEnabled = true, Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -2603,7 +2603,7 @@ namespace Tizen.Multimedia.Tests
         public void AudioPitch_THROWS_IF_AUDIOOFFLOAD_ENABLED()
         {
             SetAudioOffload();
-            Assert.That(() => TestPlayer.AudioPitch = 1.0F, Throws.InvalidOperationException);
+            Assert.That(() => TestPlayer.AudioPitch = 1.0F, Throws.TypeOf<NotAvailableException>());
         }
         #endregion
 
@@ -2795,7 +2795,7 @@ namespace Tizen.Multimedia.Tests
         {
             SetAudioOffload();
             Assert.That(() => TestPlayer.EnableExportingAudioData(_audioFormat, PlayerAudioExtractOption.NoSyncAndDeinterleave),
-                Throws.InvalidOperationException);
+                Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
index c3855f9..190c669 100755 (executable)
@@ -213,7 +213,7 @@ namespace Tizen.Multimedia.Tests
         {
             SetAudioOffload();
             var audioTrackInfo = await GetAudioTrackInfo();
-            Assert.That(() => audioTrackInfo.GetCount(), Throws.InvalidOperationException);
+            Assert.That(() => audioTrackInfo.GetCount(), Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -227,7 +227,7 @@ namespace Tizen.Multimedia.Tests
         {
             SetAudioOffload();
             var audioTrackInfo = await GetAudioTrackInfo();
-            Assert.That(() => audioTrackInfo.GetLanguageCode(0), Throws.InvalidOperationException);
+            Assert.That(() => audioTrackInfo.GetLanguageCode(0), Throws.TypeOf<NotAvailableException>());
         }
 
         [Test]
@@ -241,7 +241,7 @@ namespace Tizen.Multimedia.Tests
         {
             SetAudioOffload();
             var audioTrackInfo = await GetAudioTrackInfo();
-            Assert.That(() => audioTrackInfo.Selected, Throws.InvalidOperationException);
+            Assert.That(() => audioTrackInfo.Selected, Throws.TypeOf<NotAvailableException>());
         }
     }
 }