[MediaTool][TCSACR-275] Add Add audio channel mapping APIs for PCM format 88/215188/5
authorHaesu Gwon <haesu.gwon@samsung.com>
Wed, 2 Oct 2019 09:05:00 +0000 (18:05 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Fri, 4 Oct 2019 06:37:32 +0000 (06:37 +0000)
Change-Id: Ic3a17b2a6eb1c2e5cc0acd87f90d527d3f5e2ae9

tct-suite-vs/Tizen.Multimedia.Support.Library/AssertHelper.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.Multimedia.Tests/testcase/MediaTool/TSAudioMediaFormat.cs

old mode 100755 (executable)
new mode 100644 (file)
index 2912b54..b755c5f
@@ -3,6 +3,7 @@ using System.Linq;
 using System.Reflection;
 using System.Threading.Tasks;
 using NUnit.Framework;
+using System.Collections.Generic;
 
 public static class AssertHelper
 {
@@ -13,6 +14,18 @@ public static class AssertHelper
         Assert.True(expected.SequenceEqual(actual), message);
     }
 
+    public static void Equals<T>(IList<T> expected, IList<T> actual, string message = null)
+    {
+        message = $"Expected [{ string.Join(" ", expected) }], but got [{ string.Join(" ", actual) }].";
+
+        Assert.True(expected.Count == actual.Count, message);
+
+        foreach (var iter in actual)
+        {
+            Assert.True(expected.Contains(iter), message);
+        }
+    }
+
     public static void PropertyReadOnly<T>(string propertyName)
     {
         PropertyInfo propertyInfo = typeof(T).GetProperty(propertyName);
index 879e806..4c9a646 100644 (file)
@@ -1,5 +1,6 @@
 using NUnit.Framework;
 using System;
+using System.Collections.Generic;
 
 namespace Tizen.Multimedia.Tests
 {
@@ -11,11 +12,19 @@ namespace Tizen.Multimedia.Tests
         private const int VALID_AUDIO_SAMPLE_RATE = 21;
         private const int VALID_AUDIO_BIT = 31;
         private const int VALID_AUDIO_BIT_RATE = 41;
+        private const int VALID_AUDIO_BIT_DEPTH = 16;
 
         private const int INVALID_AUDIO_CHANNEL = -1;
         private const int INVALID_AUDIO_SAMPLE_RATE = -2;
         private const int INVALID_AUDIO_BIT = -3;
         private const int INVALID_AUDIO_BIT_RATE = -4;
+        private const int INVALID_AUDIO_BIT_DEPTH = -5;
+
+        private const int VALID_PCM_AUDIO_CHANNEL = 2;
+        private const int VALID_PCM_AUDIO_SAMPLE_RATE = 44100;
+        private const int VALID_PCM_AUDIO_BIT = 32;
+        private const int VALID_PCM_AUDIO_BIT_DEPTH = 16;
+        private const int VALID_PCM_AUDIO_BIT_RATE = 128000;
 
         [Test]
         [Category("P1")]
@@ -123,10 +132,402 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("AacType is read only")]
+        [Description("Create AudioMediaFormat instance and check whether instance is created properly.")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_CHECK_CREATE_CONSTRUCTOR()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft,
+                MediaFormatAudioChannelPosition.FrontRight,
+                MediaFormatAudioChannelPosition.FrontCenter,
+                MediaFormatAudioChannelPosition.LFE1,
+                MediaFormatAudioChannelPosition.BackLeft,
+                MediaFormatAudioChannelPosition.BackRight,
+                MediaFormatAudioChannelPosition.FrontLeftOrCenter,
+                MediaFormatAudioChannelPosition.FrontRightOrCenter,
+                MediaFormatAudioChannelPosition.BackCenter,
+                MediaFormatAudioChannelPosition.LFE2,
+                MediaFormatAudioChannelPosition.SideLeft,
+                MediaFormatAudioChannelPosition.SideRight,
+                MediaFormatAudioChannelPosition.TopFrontLeft,
+                MediaFormatAudioChannelPosition.TopFrontRight,
+                MediaFormatAudioChannelPosition.TopFrontCenter,
+                MediaFormatAudioChannelPosition.TopCenter,
+                MediaFormatAudioChannelPosition.TopBackLeft,
+                MediaFormatAudioChannelPosition.TopBackRight,
+                MediaFormatAudioChannelPosition.TopSideLeft,
+                MediaFormatAudioChannelPosition.TopSideRight,
+                MediaFormatAudioChannelPosition.TopBackCenter,
+                MediaFormatAudioChannelPosition.BottomFrontCenter,
+                MediaFormatAudioChannelPosition.BottomFrontLeft,
+                MediaFormatAudioChannelPosition.BottomFrontRight,
+                MediaFormatAudioChannelPosition.WideLeft,
+                MediaFormatAudioChannelPosition.WideRight,
+                MediaFormatAudioChannelPosition.SurroundLeft,
+                MediaFormatAudioChannelPosition.SurroundRight
+            };
+
+            var audioFormat = new AudioMediaFormat(mimeType, 28,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap);
+
+            Assert.IsNotNull(audioFormat, "Object should not be null after initializing");
+            Assert.IsInstanceOf<AudioMediaFormat>(audioFormat, "Should return AudioMediaFormat instance.");
+            Assert.AreEqual(mimeType, audioFormat.MimeType);
+            Assert.AreEqual(28, audioFormat.Channel);
+            Assert.AreEqual(VALID_PCM_AUDIO_SAMPLE_RATE, audioFormat.SampleRate);
+            Assert.AreEqual(VALID_PCM_AUDIO_BIT, audioFormat.Bit);
+            Assert.AreEqual(VALID_PCM_AUDIO_BIT_RATE, audioFormat.BitRate);
+            Assert.AreEqual(VALID_PCM_AUDIO_BIT_DEPTH, audioFormat.BitDepth);
+
+            AssertHelper.Equals(channelMap, audioFormat.AudioChannelMap);
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if one of the specified parameters is invalid")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_THROWS_IF_PARAM_IS_INVALID()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    channel: INVALID_AUDIO_CHANNEL,
+                    mimeType: mimeType,
+                    sampleRate: VALID_PCM_AUDIO_SAMPLE_RATE,
+                    bit: VALID_PCM_AUDIO_BIT,
+                    bitRate: VALID_PCM_AUDIO_BIT_RATE,
+                    bitDepth: VALID_PCM_AUDIO_BIT_DEPTH,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    sampleRate: INVALID_AUDIO_SAMPLE_RATE,
+                    mimeType: mimeType,
+                    channel: VALID_PCM_AUDIO_CHANNEL,
+                    bit: VALID_PCM_AUDIO_BIT,
+                    bitRate: VALID_PCM_AUDIO_BIT_RATE,
+                    bitDepth: VALID_PCM_AUDIO_BIT_DEPTH,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    bit: INVALID_AUDIO_BIT,
+                    mimeType: mimeType,
+                    channel: VALID_PCM_AUDIO_CHANNEL,
+                    sampleRate: VALID_PCM_AUDIO_SAMPLE_RATE,
+                    bitRate: VALID_PCM_AUDIO_BIT_RATE,
+                    bitDepth: VALID_PCM_AUDIO_BIT_DEPTH,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    bitRate: INVALID_AUDIO_BIT_RATE,
+                    mimeType: mimeType,
+                    sampleRate: VALID_PCM_AUDIO_SAMPLE_RATE,
+                    bit: VALID_PCM_AUDIO_BIT,
+                    channel: VALID_PCM_AUDIO_CHANNEL,
+                    bitDepth: VALID_PCM_AUDIO_BIT_DEPTH,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    bitDepth: INVALID_AUDIO_BIT_DEPTH,
+                    mimeType: mimeType,
+                    channel: VALID_PCM_AUDIO_CHANNEL,
+                    sampleRate: VALID_PCM_AUDIO_SAMPLE_RATE,
+                    bit: VALID_PCM_AUDIO_BIT,
+                    bitRate: VALID_PCM_AUDIO_BIT_RATE,
+                    audioChannelMap: channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if audio channel map is not matched with channel")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_THROWS_IF_AUDIOCHANNELMAP_IS_NOT_MATCHED_WITH_CHANNEL()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL + 1,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+
+            channelMap.Add(MediaFormatAudioChannelPosition.FrontCenter);
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if mono position set with other position")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_THROWS_IF_MONO_SET_WITH_OTHER_POSITION()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.Mono, MediaFormatAudioChannelPosition.FrontLeft
+            };
+
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if none position set with other position")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_THROWS_IF_NONE_SET_WITH_OTHER_POSITION()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.None, MediaFormatAudioChannelPosition.FrontLeft
+            };
+
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Create AudioMediaFormat instance and check whether instance is created properly.")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_AAC_CHECK_CREATE_CONSTRUCTOR()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+
+            var audioFormat = new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                MediaFormatAacType.None, VALID_PCM_AUDIO_BIT_DEPTH, channelMap);
+
+            Assert.IsNotNull(audioFormat, "Object should not be null after initializing");
+            Assert.IsInstanceOf<AudioMediaFormat>(audioFormat, "Should return AudioMediaFormat instance.");
+            Assert.AreEqual(mimeType, audioFormat.MimeType);
+            Assert.AreEqual(VALID_PCM_AUDIO_CHANNEL, audioFormat.Channel);
+            Assert.AreEqual(VALID_PCM_AUDIO_SAMPLE_RATE, audioFormat.SampleRate);
+            Assert.AreEqual(VALID_PCM_AUDIO_BIT, audioFormat.Bit);
+            Assert.AreEqual(VALID_PCM_AUDIO_BIT_RATE, audioFormat.BitRate);
+            Assert.AreEqual(VALID_PCM_AUDIO_BIT_DEPTH, audioFormat.BitDepth);
+            Assert.AreEqual(MediaFormatAacType.None, audioFormat.AacType);
+
+            AssertHelper.Equals(channelMap, audioFormat.AudioChannelMap);
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if one of the specified parameters is invalid")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_AAC_THROWS_IF_PARAM_IS_INVALID()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Aac;
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    channel: INVALID_AUDIO_CHANNEL,
+                    mimeType: mimeType,
+                    sampleRate: VALID_AUDIO_SAMPLE_RATE,
+                    bit: VALID_AUDIO_BIT,
+                    bitRate: VALID_AUDIO_BIT_RATE,
+                    bitDepth: VALID_AUDIO_BIT_DEPTH,
+                    aacType: MediaFormatAacType.Adif,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    sampleRate: INVALID_AUDIO_SAMPLE_RATE,
+                    mimeType: mimeType,
+                    channel: VALID_AUDIO_CHANNEL,
+                    bit: VALID_AUDIO_BIT,
+                    bitRate: VALID_AUDIO_BIT_RATE,
+                    bitDepth: VALID_AUDIO_BIT_DEPTH,
+                    aacType: MediaFormatAacType.Adif,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    bit: INVALID_AUDIO_BIT,
+                    mimeType: mimeType,
+                    channel: VALID_AUDIO_CHANNEL,
+                    sampleRate: VALID_AUDIO_SAMPLE_RATE,
+                    bitRate: VALID_AUDIO_BIT_RATE,
+                    bitDepth: VALID_AUDIO_BIT_DEPTH,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    bitRate: INVALID_AUDIO_BIT_RATE,
+                    mimeType: mimeType,
+                    sampleRate: VALID_AUDIO_SAMPLE_RATE,
+                    bit: VALID_AUDIO_BIT,
+                    channel: VALID_AUDIO_CHANNEL,
+                    bitDepth: VALID_AUDIO_BIT_DEPTH,
+                    aacType: MediaFormatAacType.Adif,
+                    audioChannelMap: channelMap));
+
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => new AudioMediaFormat(
+                    bitDepth: INVALID_AUDIO_BIT_DEPTH,
+                    mimeType: mimeType,
+                    channel: VALID_AUDIO_CHANNEL,
+                    sampleRate: VALID_AUDIO_SAMPLE_RATE,
+                    bit: VALID_AUDIO_BIT,
+                    bitRate: VALID_AUDIO_BIT_RATE,
+                    aacType: MediaFormatAacType.Adif,
+                    audioChannelMap: channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if audio channel map is not matched with channel")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_AAC_THROWS_IF_AUDIOCHANNELMAP_IS_NOT_MATCHED_WITH_CHANNEL()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL + 1,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                 MediaFormatAacType.None, VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+
+            channelMap.Add(MediaFormatAudioChannelPosition.FrontCenter);
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                MediaFormatAacType.None, VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if mono position set with other position")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_AAC_THROWS_IF_MONO_SET_WITH_OTHER_POSITION()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.Mono, MediaFormatAudioChannelPosition.FrontLeft
+            };
+
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                MediaFormatAacType.None, VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws exception if none position set with other position")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_AAC_THROWS_IF_NONE_SET_WITH_OTHER_POSITION()
+        {
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.None, MediaFormatAudioChannelPosition.FrontLeft
+            };
+
+            Assert.Throws<ArgumentException>(() => new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                MediaFormatAacType.None, VALID_PCM_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Throws if the specified aac type is not none but the mime type is not a aac type")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioMediaFormat C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTX")]
+        [Property("COVPARAM", "MediaFormatAudioMimeType, int, int, int, int, MediaFormatAacType, int, IList<Tizen.Multimedia.MediaFormatAudioChannelPosition>")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioMediaFormat_ChannelMap_AAC_THROWS_IF_AAC_SPECIFIED_WITH_NOT_AAC_MIME_TYPE()
+        {
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+
+            Assert.Throws<ArgumentException>(
+                () => new AudioMediaFormat(MediaFormatAudioMimeType.Flac, VALID_AUDIO_CHANNEL,
+                    VALID_AUDIO_SAMPLE_RATE, VALID_AUDIO_BIT, VALID_AUDIO_BIT_RATE,
+                    MediaFormatAacType.Adif, VALID_AUDIO_BIT_DEPTH, channelMap));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether AacType returns expected value or not.")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AacType A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
         public void AacType_READONLY()
         {
             AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.AacType));
@@ -134,10 +535,11 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Bit is read only")]
+        [Description("Check whether Bit returns expected value or not.")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.Bit A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
         public void Bit_READONLY()
         {
             AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.Bit));
@@ -145,10 +547,11 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("BitRate is read only")]
+        [Description("Check whether BitRate returns expected value or not.")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.BitRate A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
         public void BitRate_READONLY()
         {
             AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.BitRate));
@@ -156,10 +559,11 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Channel is read only")]
+        [Description("Check whether Channel returns expected value or not.")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.Channel A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
         public void Channel_READONLY()
         {
             AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.Channel));
@@ -167,10 +571,11 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("MimeType is read only")]
+        [Description("Check whether MimeType returns expected value or not.")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.MimeType A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
         public void MimeType_READONLY()
         {
             AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.MimeType));
@@ -178,10 +583,11 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("SampleRate is read only")]
+        [Description("Check whether SampleRate returns expected value or not.")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.SampleRate A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
         public void SampleRate_READONLY()
         {
             AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.SampleRate));
@@ -189,6 +595,54 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Check whether BitDepth returns expected value or not.")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.BitDepth A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void BitDepth_READONLY()
+        {
+            AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.BitDepth));
+
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+
+            var audioFormat = new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap);
+
+            Assert.That(audioFormat.BitDepth, Is.EqualTo(VALID_PCM_AUDIO_BIT_DEPTH));
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether AudioChannelMap returns expected value or not.")]
+        [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.AudioChannelMap A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void AudioChannelMap_READONLY()
+        {
+            AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.AudioChannelMap));
+
+            const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Pcm;
+            var channelMap = new List<MediaFormatAudioChannelPosition>()
+            {
+                MediaFormatAudioChannelPosition.FrontLeft, MediaFormatAudioChannelPosition.FrontRight
+            };
+
+            var audioFormat = new AudioMediaFormat(mimeType, VALID_PCM_AUDIO_CHANNEL,
+                VALID_PCM_AUDIO_SAMPLE_RATE, VALID_PCM_AUDIO_BIT, VALID_PCM_AUDIO_BIT_RATE,
+                VALID_PCM_AUDIO_BIT_DEPTH, channelMap);
+
+            AssertHelper.Equals(channelMap, audioFormat.AudioChannelMap);
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Compares AudioMediaFormat instances with Equals")]
         [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.Equals M")]
         [Property("SPEC_URL", "-")]