public void Clear_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => _audioEffect.Clear(), Throws.InvalidOperationException);
+ Assert.That(() => _audioEffect.Clear(), Throws.TypeOf<NotAvailableException>());
}
[Test]
public void this_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => _audioEffect[0], Throws.InvalidOperationException);
+ Assert.That(() => _audioEffect[0], Throws.TypeOf<NotAvailableException>());
}
[Test]
public void Count_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => _audioEffect.Count, Throws.InvalidOperationException);
+ Assert.That(() => _audioEffect.Count, Throws.TypeOf<NotAvailableException>());
}
[Test]
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]
public void Frequency_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => _band.Frequency, Throws.InvalidOperationException);
+ Assert.That(() => _band.Frequency, Throws.TypeOf<NotAvailableException>());
}
[Test]
public void FrequencyRange_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => _band.FrequencyRange, Throws.InvalidOperationException);
+ Assert.That(() => _band.FrequencyRange, Throws.TypeOf<NotAvailableException>());
}
[Test]
public void Level_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => _band.Level, Throws.InvalidOperationException);
+ Assert.That(() => _band.Level, Throws.TypeOf<NotAvailableException>());
}
}
}
public void ReplayGain_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => TestPlayer.ReplayGain = true, Throws.InvalidOperationException);
+ Assert.That(() => TestPlayer.ReplayGain = true, Throws.TypeOf<NotAvailableException>());
}
#endregion
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
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
public void AudioPitchEnabled_THROWS_IF_AUDIOOFFLOAD_ENABLED()
{
SetAudioOffload();
- Assert.That(() => TestPlayer.AudioPitchEnabled = true, Throws.InvalidOperationException);
+ Assert.That(() => TestPlayer.AudioPitchEnabled = true, Throws.TypeOf<NotAvailableException>());
}
[Test]
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
{
SetAudioOffload();
Assert.That(() => TestPlayer.EnableExportingAudioData(_audioFormat, PlayerAudioExtractOption.NoSyncAndDeinterleave),
- Throws.InvalidOperationException);
+ Throws.TypeOf<NotAvailableException>());
}
[Test]
{
SetAudioOffload();
var audioTrackInfo = await GetAudioTrackInfo();
- Assert.That(() => audioTrackInfo.GetCount(), Throws.InvalidOperationException);
+ Assert.That(() => audioTrackInfo.GetCount(), Throws.TypeOf<NotAvailableException>());
}
[Test]
{
SetAudioOffload();
var audioTrackInfo = await GetAudioTrackInfo();
- Assert.That(() => audioTrackInfo.GetLanguageCode(0), Throws.InvalidOperationException);
+ Assert.That(() => audioTrackInfo.GetLanguageCode(0), Throws.TypeOf<NotAvailableException>());
}
[Test]
{
SetAudioOffload();
var audioTrackInfo = await GetAudioTrackInfo();
- Assert.That(() => audioTrackInfo.Selected, Throws.InvalidOperationException);
+ Assert.That(() => audioTrackInfo.Selected, Throws.TypeOf<NotAvailableException>());
}
}
}