{
[TestFixture]
[Description("Testing Tizen.Multimedia.AsyncAudioCapture class")]
- public static class AsyncAudioCaptureTests
+ public class AsyncAudioCaptureTests
{
public const string LogTag = "TizenTest.Multimedia.AsyncAudioCapture";
private static AsyncAudioCapture AsyncCapture;
private static bool _isMicrophoneAvail;
[OneTimeSetUp]
- public static void OneTimeSetup()
+ public void OneTimeSetup()
{
Information.TryGetValue<bool>("tizen.org/feature/microphone", out _isMicrophoneAvail);
Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail);
}
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
if (_isMicrophoneAvail)
AsyncCapture = new AsyncAudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le);
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
AsyncCapture?.Dispose();
}
[Property("SPEC", "Tizen.Multimedia.AsyncAudioCapture.AsyncAudioCapture C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
- public static void AsyncAudioCapture_CHECK()
+ public void AsyncAudioCapture_CHECK()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTX")]
[Property("AUTHOR", "Jeongho Mok, jho.mok@samsung.com")]
- public static void AsyncAudioCapture_THROWS_IF_MICROPHONE_NOT_SUPPORTED()
+ public void AsyncAudioCapture_THROWS_IF_MICROPHONE_NOT_SUPPORTED()
{
if (_isMicrophoneAvail)
return;
{
[TestFixture]
[Description("Testing Tizen.Multimedia.AudioCapture class")]
- public static class AudioCaptureTests
+ public class AudioCaptureTests
{
public const string LogTag = "TizenTest.Multimedia.AudioCapture";
private static AudioCapture Capture;
private static bool _isMicrophoneAvail;
[OneTimeSetUp]
- public static void OneTimeSetup()
+ public void OneTimeSetup()
{
Information.TryGetValue<bool>("tizen.org/feature/microphone", out _isMicrophoneAvail);
Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail);
}
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
if (_isMicrophoneAvail)
Capture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le);
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Capture?.Dispose();
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioCapture_CREATE_MONO_U8()
+ public void AudioCapture_CREATE_MONO_U8()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioCapture_CREATE_MONO_S16Le()
+ public void AudioCapture_CREATE_MONO_S16Le()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioCapture_CREATE_STEREO_U8()
+ public void AudioCapture_CREATE_STEREO_U8()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioCapture_CREATE_STEREO_S16Le()
+ public void AudioCapture_CREATE_STEREO_S16Le()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioCapture_THROWS_IF_SAMPLE_RATE_INVALID()
+ public void AudioCapture_THROWS_IF_SAMPLE_RATE_INVALID()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")]
- public static void AudioCapture_THROWS_IF_CHANNEL_INVALID()
+ public void AudioCapture_THROWS_IF_CHANNEL_INVALID()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")]
- public static void AudioCapture_THROWS_IF_SAMPLE_TYPE_INVALID()
+ public void AudioCapture_THROWS_IF_SAMPLE_TYPE_INVALID()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTX")]
[Property("AUTHOR", "Jeongho Mok, jho.mok@samsung.com")]
- public static void AudioCapture_THROWS_IF_MICROPHONE_NOT_SUPPORTED()
+ public void AudioCapture_THROWS_IF_MICROPHONE_NOT_SUPPORTED()
{
if (_isMicrophoneAvail)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Prepare_CHECK_NO_EXCEPTION()
+ public void Prepare_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Prepare_THROWS_IF_ALREADY_PREPARED()
+ public void Prepare_THROWS_IF_ALREADY_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Unprepare_CHECK_NO_EXCEPTION()
+ public void Unprepare_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Unprepare_THROWS_IF_NOT_PREPARED()
+ public void Unprepare_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Read_CHECK_RETURN()
+ public void Read_CHECK_RETURN()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Read_THROWS_IF_LENGTH_INVALID()
+ public void Read_THROWS_IF_LENGTH_INVALID()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Read_THROWS_IF_NOT_PREPARED()
+ public void Read_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Read_THROWS_IF_PAUSED()
+ public void Read_THROWS_IF_PAUSED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Pause_CHECK_NO_EXCEPTION()
+ public void Pause_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Pause_THROWS_IF_NOT_PREPARED()
+ public void Pause_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Resume_CHECK_NO_EXCEPTION()
+ public void Resume_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Resume_THROWS_IF_NOT_PREPARED()
+ public void Resume_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Flush_CHECK_NO_EXCEPTION()
+ public void Flush_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Flush_THROWS_IF_NOT_PREPARED()
+ public void Flush_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
{
[TestFixture]
[Description("Testing Tizen.Multimedia.AudioCaptureBase class")]
- public static class AudioCaptureBaseTests
+ public class AudioCaptureBaseTests
{
public const string LogTag = "TizenTest.Multimedia.AudioCaptureBase";
- private static AudioCaptureBase Capture;
- private static bool _isMicrophoneAvail;
+ private AudioCaptureBase Capture;
+ private bool _isMicrophoneAvail;
[OneTimeSetUp]
- public static void OneTimeSetup()
+ public void OneTimeSetup()
{
Information.TryGetValue("tizen.org/feature/microphone", out _isMicrophoneAvail);
Tizen.Log.Info(LogTag, "Microphone available : " + _isMicrophoneAvail);
}
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
if (_isMicrophoneAvail)
Capture = new AudioCapture(44100, AudioChannel.Mono, AudioSampleType.S16Le);
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Capture?.Dispose();
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Prepare_CHECK_NO_EXCEPTION()
+ public void Prepare_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Prepare_THROWS_IF_ALREADY_PREPARED()
+ public void Prepare_THROWS_IF_ALREADY_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Unprepare_CHECK_NO_EXCEPTION()
+ public void Unprepare_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Unprepare_THROWS_IF_NOT_PREPARED()
+ public void Unprepare_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Pause_CHECK_NO_EXCEPTION()
+ public void Pause_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Pause_THROWS_IF_NOT_PREPARED()
+ public void Pause_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Resume_CHECK_NO_EXCEPTION()
+ public void Resume_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Resume_THROWS_IF_NOT_PREPARED()
+ public void Resume_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Flush_CHECK_NO_EXCEPTION()
+ public void Flush_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Flush_THROWS_IF_NOT_PREPARED()
+ public void Flush_THROWS_IF_NOT_PREPARED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static async Task StateChanged_CHECK()
+ public async Task StateChanged_CHECK()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void GetBufferSize_CHECK()
+ public void GetBufferSize_CHECK()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.Channel A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void Channel_READONLY()
+ public void Channel_READONLY()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.SampleRate A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void SampleRate_READONLY()
+ public void SampleRate_READONLY()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.SampleType A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void SampleType_READONLY()
+ public void SampleType_READONLY()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
- public static void ApplyStreamPolicy_CHECK_NO_EXCEPTION()
+ public void ApplyStreamPolicy_CHECK_NO_EXCEPTION()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
- public static void ApplyStreamPolicy_THROWS_IF_NOT_SUPPORTED()
+ public void ApplyStreamPolicy_THROWS_IF_NOT_SUPPORTED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
- public static void ApplyStreamPolicy_THROWS_IF_NULL()
+ public void ApplyStreamPolicy_THROWS_IF_NULL()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC", "Tizen.Multimedia.AudioCaptureBase.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
- public static void ApplyStreamPolicy_THROWS_IF_DISPOSED()
+ public void ApplyStreamPolicy_THROWS_IF_DISPOSED()
{
if (_isMicrophoneAvail == false)
return;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void MinSampleRate_INT_TYPE()
+ public void MinSampleRate_INT_TYPE()
{
Assert.That(AudioCaptureBase.MinSampleRate, Is.InstanceOf<int>());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void MaxSampleRate_INT_TYPE()
+ public void MaxSampleRate_INT_TYPE()
{
Assert.That(AudioCaptureBase.MaxSampleRate, Is.InstanceOf<int>());
}
{
[TestFixture]
[Description("Testing Tizen.Multimedia.AudioDataAvailableEventArgs class")]
- public static class AudioDataAvailableEventArgsTests
+ public class AudioDataAvailableEventArgsTests
{
[Test]
[Category("P1")]
[Property("SPEC", "Tizen.Multimedia.AudioDataAvailableEventArgs.Data A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void Data_READONLY()
+ public void Data_READONLY()
{
AssertHelper.PropertyReadOnly<AudioDataAvailableEventArgs>(nameof(AudioDataAvailableEventArgs.Data));
}
{
[TestFixture]
[Description("Testing Tizen.Multimedia.AudioIOStateChangedEventArgs class")]
- public static class AudioIOStateChangedEventArgsTests
+ public class AudioIOStateChangedEventArgsTests
{
[Test]
[Category("P1")]
[Property("SPEC", "Tizen.Multimedia.AudioIOStateChangedEventArgs.ByPolicy A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void ByPolicy_READONLY()
+ public void ByPolicy_READONLY()
{
AssertHelper.PropertyReadOnly<AudioIOStateChangedEventArgs>(nameof(AudioIOStateChangedEventArgs.ByPolicy));
}
[Property("SPEC", "Tizen.Multimedia.AudioIOStateChangedEventArgs.Current A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void Current_READONLY()
+ public void Current_READONLY()
{
AssertHelper.PropertyReadOnly<AudioIOStateChangedEventArgs>(nameof(AudioIOStateChangedEventArgs.Current));
}
[Property("SPEC", "Tizen.Multimedia.AudioIOStateChangedEventArgs.Previous A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void Previous_READONLY()
+ public void Previous_READONLY()
{
AssertHelper.PropertyReadOnly<AudioIOStateChangedEventArgs>(nameof(AudioIOStateChangedEventArgs.Previous));
}
[TestFixture]
[Description("Testing Tizen.Multimedia.AudioPlayback class")]
- public static class AudioPlaybackTests
+ public class AudioPlaybackTests
{
private const int TableSize = 200;
private const int MaxSize = 131072;
private const int HalfAmplitudeSize = 32768;
- private static AudioPlayback Playback;
+ private AudioPlayback Playback;
- public static byte[] CreateData(int length)
+ public byte[] CreateData(int length)
{
if (length <= 0)
{
}
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
Playback = new AudioPlayback(44100, AudioChannel.Mono, AudioSampleType.S16Le);
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
Playback?.Dispose();
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioPlayback_CREATE_MONO_U8()
+ public void AudioPlayback_CREATE_MONO_U8()
{
Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Mono, AudioSampleType.U8));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioPlayback_CREATE_MONO_S16Le()
+ public void AudioPlayback_CREATE_MONO_S16Le()
{
Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Mono, AudioSampleType.S16Le));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioPlayback_CREATE_STEREO_U8()
+ public void AudioPlayback_CREATE_STEREO_U8()
{
Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Stereo, AudioSampleType.U8));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioPlayback_CREATE_STEREO_S16Le()
+ public void AudioPlayback_CREATE_STEREO_S16Le()
{
Assert.DoesNotThrow(() => new AudioPlayback(44100, AudioChannel.Stereo, AudioSampleType.S16Le));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void AudioPlayback_THROWS_IF_SAMPLE_RATE_INVALID()
+ public void AudioPlayback_THROWS_IF_SAMPLE_RATE_INVALID()
{
Assert.DoesNotThrow(() =>
new AudioPlayback(AudioPlayback.MaxSampleRate, AudioChannel.Stereo, AudioSampleType.S16Le));
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")]
- public static void AudioPlayback_THROWS_IF_CHANNEL_INVALID()
+ public void AudioPlayback_THROWS_IF_CHANNEL_INVALID()
{
Assert.Throws<ArgumentException>(() =>
new AudioPlayback(AudioPlayback.MinSampleRate, AudioChannel.Mono - 1, AudioSampleType.U8));
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Seungbae Shin, seungbae.shin@samsung.com")]
- public static void AudioPlayback_THROWS_IF_SAMPLE_TYPE_INVALID()
+ public void AudioPlayback_THROWS_IF_SAMPLE_TYPE_INVALID()
{
Assert.Throws<ArgumentException>(() =>
new AudioPlayback(AudioPlayback.MinSampleRate, AudioChannel.Mono, AudioSampleType.U8 - 1));
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Prepare_CHECK_NO_EXCEPTION()
+ public void Prepare_CHECK_NO_EXCEPTION()
{
Assert.DoesNotThrow(() => Playback.Prepare());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Prepare_THROWS_IF_ALREADY_PREPARED()
+ public void Prepare_THROWS_IF_ALREADY_PREPARED()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Unprepare_CHECK_NO_EXCEPTION()
+ public void Unprepare_CHECK_NO_EXCEPTION()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Unprepare_THROWS_IF_NOT_PREPARED()
+ public void Unprepare_THROWS_IF_NOT_PREPARED()
{
Assert.Throws<InvalidOperationException>(() => Playback.Unprepare());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Write_CHECK_NO_EXCEPTION()
+ public void Write_CHECK_NO_EXCEPTION()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Write_THROWS_IF_BUFFER_IS_NULL()
+ public void Write_THROWS_IF_BUFFER_IS_NULL()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Write_THROWS_IF_BUFFER_LENGTH_IS_ZERO()
+ public void Write_THROWS_IF_BUFFER_LENGTH_IS_ZERO()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Write_THROWS_IF_NOT_PREPARED()
+ public void Write_THROWS_IF_NOT_PREPARED()
{
Assert.Throws<InvalidOperationException>(() => Playback.Write(new byte[1]));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Write_THROWS_IF_PAUSED()
+ public void Write_THROWS_IF_PAUSED()
{
Playback.Prepare();
Playback.Pause();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Write_THROWS_IF_DISPOSED()
+ public void Write_THROWS_IF_DISPOSED()
{
Playback.Prepare();
Playback.Unprepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Drain_CHECK_NO_EXCEPTION()
+ public void Drain_CHECK_NO_EXCEPTION()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Drain_THROWS_IF_NOT_PREPARED()
+ public void Drain_THROWS_IF_NOT_PREPARED()
{
Assert.Throws<InvalidOperationException>(() => Playback.Drain());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Pause_CHECK_NO_EXCEPTION()
+ public void Pause_CHECK_NO_EXCEPTION()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Pause_THROWS_IF_NOT_PREPARED()
+ public void Pause_THROWS_IF_NOT_PREPARED()
{
Assert.Throws<InvalidOperationException>(() => Playback.Pause());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Resume_CHECK_NO_EXCEPTION()
+ public void Resume_CHECK_NO_EXCEPTION()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Resume_THROWS_IF_NOT_PREPARED()
+ public void Resume_THROWS_IF_NOT_PREPARED()
{
Assert.Throws<InvalidOperationException>(() => Playback.Resume());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Flush_CHECK_NO_EXCEPTION()
+ public void Flush_CHECK_NO_EXCEPTION()
{
Playback.Prepare();
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Sangchul Lee, sc11.lee@samsung.com")]
- public static void Flush_THROWS_IF_NOT_PREPARED()
+ public void Flush_THROWS_IF_NOT_PREPARED()
{
Assert.Throws<InvalidOperationException>(() => Playback.Flush());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static async Task StateChanged_CHECK()
+ public async Task StateChanged_CHECK()
{
using (var eventAwaiter = EventAwaiter<AudioIOStateChangedEventArgs>.Create())
{
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "EVL")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static async Task BufferAvailable_CHECK()
+ public async Task BufferAvailable_CHECK()
{
using (var eventAwaiter = EventAwaiter<AudioPlaybackBufferAvailableEventArgs>.Create())
{
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static async Task Pause_THROWS_IF_CALLED_IN_EVENT_HANDLER()
+ public async Task Pause_THROWS_IF_CALLED_IN_EVENT_HANDLER()
{
var exCapture = new ExceptionCapture();
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.GetBufferSize M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
- public static void GetBufferSize_CHECK()
+ public void GetBufferSize_CHECK()
{
Assert.Greater(Playback.GetBufferSize(), 0);
}
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
- public static void ApplyStreamPolicy_CHECK_NO_EXCEPTION()
+ public void ApplyStreamPolicy_CHECK_NO_EXCEPTION()
{
AudioStreamPolicy mediaStreamPolicy = new AudioStreamPolicy(AudioStreamType.Media);
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
- public static void ApplyStreamPolicy_THROWS_IF_NOT_SUPPORTED()
+ public void ApplyStreamPolicy_THROWS_IF_NOT_SUPPORTED()
{
AudioStreamPolicy voiceRecognitionStreamPolicy = new AudioStreamPolicy(AudioStreamType.VoiceRecognition);
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
- public static void ApplyStreamPolicy_THROWS_IF_NULL()
+ public void ApplyStreamPolicy_THROWS_IF_NULL()
{
Assert.Throws<ArgumentNullException>(() => Playback.ApplyStreamPolicy(null));
}
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.ApplyStreamPolicy M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
- public static void ApplyStreamPolicy_THROWS_IF_DISPOSED()
+ public void ApplyStreamPolicy_THROWS_IF_DISPOSED()
{
AudioStreamPolicy mediaStreamPolicy = new AudioStreamPolicy(AudioStreamType.Media);
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.Channel A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void Channel_READONLY()
+ public void Channel_READONLY()
{
AssertHelper.PropertyReadOnly<AudioPlayback>(nameof(AudioPlayback.Channel));
}
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.SampleRate A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void SampleRate_READONLY()
+ public void SampleRate_READONLY()
{
AssertHelper.PropertyReadOnly<AudioPlayback>(nameof(AudioPlayback.SampleRate));
}
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.SampleType A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void SampleType_READONLY()
+ public void SampleType_READONLY()
{
AssertHelper.PropertyReadOnly<AudioPlayback>(nameof(AudioPlayback.SampleType));
}
[Property("SPEC", "Tizen.Multimedia.AudioPlayback.StreamType A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void StreamType_READONLY()
+ public void StreamType_READONLY()
{
AssertHelper.PropertyReadOnly<AudioPlayback>(nameof(AudioPlayback.StreamType));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void MinSampleRate_INT_TYPE()
+ public void MinSampleRate_INT_TYPE()
{
Assert.That(AudioPlayback.MinSampleRate, Is.InstanceOf<int>());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void MaxSampleRate_INT_TYPE()
+ public void MaxSampleRate_INT_TYPE()
{
Assert.That(AudioPlayback.MaxSampleRate, Is.InstanceOf<int>());
}
{
[TestFixture]
[Description("Testing Tizen.Multimedia.AudioPlaybackBufferAvailableEventArgs class")]
- public static class AudioPlaybackBufferAvailableEventArgsTests
+ public class AudioPlaybackBufferAvailableEventArgsTests
{
[Test]
[Category("P1")]
[Property("SPEC", "Tizen.Multimedia.AudioPlaybackBufferAvailableEventArgs.Length A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void Length_READONLY()
+ public void Length_READONLY()
{
AssertHelper.PropertyReadOnly<AudioPlaybackBufferAvailableEventArgs>(nameof(AudioPlaybackBufferAvailableEventArgs.Length));
}
{
[TestFixture]
[Description("Tizen.Multimedia.TonePlayer tests")]
- public static class TonePlayerTests
+ public class TonePlayerTests
{
- public static CancellationTokenSource cts = null;
- public static AudioStreamPolicy audioStreamPolicy = null;
+ public CancellationTokenSource cts = null;
+ public AudioStreamPolicy audioStreamPolicy = null;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
cts = new CancellationTokenSource();
audioStreamPolicy = new AudioStreamPolicy(AudioStreamType.Media);
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
cts?.Dispose();
audioStreamPolicy?.Dispose();
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_STREAM_POLICY_IS_NULL()
+ public void StartAsync_THROWS_IF_STREAM_POLICY_IS_NULL()
{
Assert.ThrowsAsync<ArgumentNullException>(
() => TonePlayer.StartAsync(ToneType.Default, null, -1));
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_DURATION_IS_NEGATIVE()
+ public void StartAsync_THROWS_IF_DURATION_IS_NEGATIVE()
{
Assert.ThrowsAsync<ArgumentOutOfRangeException>(
() => TonePlayer.StartAsync(ToneType.Default, audioStreamPolicy, -2));
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_TONETYPE_NOT_VALID()
+ public void StartAsync_THROWS_IF_TONETYPE_NOT_VALID()
{
int outOfRangeVal = Enum.GetValues(typeof(ToneType)).Cast<int>().Max() + 2;
Assert.ThrowsAsync<ArgumentException>(() =>
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static async Task StartAsync_PLAY_NO_EXCEPTION()
+ public async Task StartAsync_PLAY_NO_EXCEPTION()
{
try
{
[Property("CRITERIA", "MAE")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static async Task StartAsync_CHECK_TONETYPE_ENUM_ALL()
+ public async Task StartAsync_CHECK_TONETYPE_ENUM_ALL()
{
foreach (ToneType type in Enum.GetValues(typeof(ToneType)))
{
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int, CancellationToken")]
- public static void StartAsync_CANCELLATION_CHECK()
+ public void StartAsync_CANCELLATION_CHECK()
{
using (var task = TonePlayer.StartAsync(ToneType.Default, audioStreamPolicy, 500, cts.Token))
{
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "ToneType, AudioStreamPolicy, int, CancellationToken")]
- public static void StartAsync_ALREADY_CANCELLATION_CHECK()
+ public void StartAsync_ALREADY_CANCELLATION_CHECK()
{
cts.Cancel();
{
[TestFixture]
[Description("Tizen.Multimedia.WavPlayer tests")]
- public static class WavPlayerTests
+ public class WavPlayerTests
{
private const string FilePath = "/opt/usr/home/owner/share/res/test.wav";
private const string InvalidPath = "/opt/usr/home/owner/share/res/test.invalid";
- public static CancellationTokenSource cts = null;
- public static AudioStreamPolicy audioStreamPolicy = null;
+ public CancellationTokenSource cts = null;
+ public AudioStreamPolicy audioStreamPolicy = null;
[SetUp]
- public static void SetUp()
+ public void SetUp()
{
cts = new CancellationTokenSource();
audioStreamPolicy = new AudioStreamPolicy(AudioStreamType.Media);
}
[TearDown]
- public static void TearDown()
+ public void TearDown()
{
cts?.Dispose();
audioStreamPolicy?.Dispose();
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "string, AudioStreamPolicy")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_FILEPATH_NULL_OR_EMPTY()
+ public void StartAsync_THROWS_IF_FILEPATH_NULL_OR_EMPTY()
{
Assert.ThrowsAsync<ArgumentNullException>(
() => WavPlayer.StartAsync(null, audioStreamPolicy));
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "string, AudioStreamPolicy")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_STREAM_POLICY_IS_NULL()
+ public void StartAsync_THROWS_IF_STREAM_POLICY_IS_NULL()
{
Assert.ThrowsAsync<ArgumentNullException>(
() => WavPlayer.StartAsync(FilePath, null));
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "string, AudioStreamPolicy")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static async Task StartAsync_PLAY()
+ public async Task StartAsync_PLAY()
{
try
{
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "string, AudioStreamPolicy")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_PATH_INVALID()
+ public void StartAsync_THROWS_IF_PATH_INVALID()
{
Assert.ThrowsAsync<FileNotFoundException>(
() => WavPlayer.StartAsync(InvalidPath, audioStreamPolicy));
[Property("CRITERIA", "MEX")]
[Property("COVPARAM", "string, AudioStreamPolicy")]
[Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")]
- public static void StartAsync_THROWS_IF_NOT_SUPPORTED()
+ public void StartAsync_THROWS_IF_NOT_SUPPORTED()
{
Assert.ThrowsAsync<FileFormatException>(
() => WavPlayer.StartAsync("/opt/usr/home/owner/share/res/test.mp3", audioStreamPolicy));
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "string, AudioStreamPolicy, CancellationToken")]
- public static void StartAsync_CANCELLATION_CHECK()
+ public void StartAsync_CANCELLATION_CHECK()
{
using (var task = WavPlayer.StartAsync(FilePath, audioStreamPolicy, cts.Token))
{
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("COVPARAM", "string, AudioStreamPolicy, CancellationToken")]
- public static void StartAsync_ALREADY_CANCELLATION_CHECK()
+ public void StartAsync_ALREADY_CANCELLATION_CHECK()
{
cts.Cancel();