try
{
checkEquals = TestPlayer.AudioPitchEnabled.Equals(false);
+ Assert.That(checkEquals, Is.EqualTo(true));
}
catch (NotAvailableException)
{
else
Assert.Fail($"exeption occurs even though software codec is used.");
}
- finally
- {
- Assert.That(checkEquals, Is.EqualTo(true));
- }
}
[Test]
try
{
TestPlayer.AudioPitchEnabled = true;
+ Assert.That(TestPlayer.AudioPitchEnabled, Is.EqualTo(true));
}
catch (NotAvailableException)
{
else
Assert.Fail($"exeption occurs even though software codec is used.");
}
- finally
- {
- Assert.That(TestPlayer.AudioPitchEnabled, Is.EqualTo(true));
- }
}
[Test]
try
{
TestPlayer.AudioPitchEnabled = true;
+ Assert.That(TestPlayer.AudioPitch, Is.EqualTo(1));
}
catch (NotAvailableException)
{
else
Assert.Fail($"exeption occurs even though software codec is used.");
}
- finally
- {
- Assert.That(TestPlayer.AudioPitch, Is.EqualTo(1));
- }
}
[Test]
try
{
TestPlayer.AudioPitchEnabled = true;
+
+ const float value = 1.212F;
+ TestPlayer.AudioPitch = value;
+ Assert.That(TestPlayer.AudioPitch, Is.EqualTo(value));
}
catch (NotAvailableException)
{
else
Assert.Fail($"exeption occurs even though software codec is used.");
}
- finally
- {
- const float value = 1.212F;
- TestPlayer.AudioPitch = value;
- Assert.That(TestPlayer.AudioPitch, Is.EqualTo(value));
- }
}
[Test]
try
{
TestPlayer.AudioPitchEnabled = true;
+
+ const float value = 0.5F;
+ TestPlayer.AudioPitch = value;
+ Assert.That(TestPlayer.AudioPitch, Is.EqualTo(value));
}
catch (NotAvailableException)
{
else
Assert.Fail($"exeption occurs even though software codec is used.");
}
- finally
- {
- const float value = 0.5F;
- TestPlayer.AudioPitch = value;
- Assert.That(TestPlayer.AudioPitch, Is.EqualTo(value));
- }
}
[Test]
try
{
TestPlayer.AudioPitchEnabled = true;
+
+ const float value = 2.0F;
+ TestPlayer.AudioPitch = value;
+ Assert.That(TestPlayer.AudioPitch, Is.EqualTo(value));
}
catch (NotAvailableException)
{
else
Assert.Fail($"exeption occurs even though software codec is used.");
}
- finally
- {
- const float value = 2.0F;
- TestPlayer.AudioPitch = value;
- Assert.That(TestPlayer.AudioPitch, Is.EqualTo(value));
- }
}
[Test]
[Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
public void AudioPitch_OUT_OF_RANGE()
{
- TestPlayer.AudioPitchEnabled = true;
- Assert.That(() => TestPlayer.AudioPitch = 0.4F, Throws.TypeOf<ArgumentOutOfRangeException>());
- Assert.That(() => TestPlayer.AudioPitch = 2.1F, Throws.TypeOf<ArgumentOutOfRangeException>());
+ try
+ {
+ TestPlayer.AudioPitchEnabled = true;
+ Assert.That(() => TestPlayer.AudioPitch = 0.4F, Throws.TypeOf<ArgumentOutOfRangeException>());
+ Assert.That(() => TestPlayer.AudioPitch = 2.1F, Throws.TypeOf<ArgumentOutOfRangeException>());
+ }
+ catch (NotAvailableException)
+ {
+ CodecType codecType = TestPlayer.AudioCodecType;
+ if (codecType == CodecType.Hardware)
+ Assert.Pass($"It could be not available depending on the platform capabilities");
+ else
+ Assert.Fail($"exeption occurs even though software codec is used.");
+ }
}
[Test]
[Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
public void AudioPitch_IS_NOT_ENABLED()
{
- TestPlayer.AudioPitchEnabled = false;
- Assert.That(() => TestPlayer.AudioPitch = 0.82F, Throws.TypeOf<InvalidOperationException>());
+ try
+ {
+ TestPlayer.AudioPitchEnabled = false;
+ Assert.That(() => TestPlayer.AudioPitch = 0.82F, Throws.TypeOf<InvalidOperationException>());
+ }
+ catch (NotAvailableException)
+ {
+ CodecType codecType = TestPlayer.AudioCodecType;
+ if (codecType == CodecType.Hardware)
+ Assert.Pass($"It could be not available depending on the platform capabilities");
+ else
+ Assert.Fail($"exeption occurs even though software codec is used.");
+ }
}
[Test]