From: Haesu Gwon Date: Thu, 6 Dec 2018 02:27:28 +0000 (+0900) Subject: [MediaTool][TCSACR-199][Add new API for the VideoMediaFormat] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e596561008c4141872a7373edc5566a17e8a083;p=test%2Ftct%2Fcsharp%2Fapi.git [MediaTool][TCSACR-199][Add new API for the VideoMediaFormat] Change-Id: I1b35f86fac627cd7b24e9b6b07b3c52db64c68d3 --- diff --git a/tct-suite-vs/Tizen.Multimedia.Tests/testcase/MediaTool/TSVideoMediaFormat.cs b/tct-suite-vs/Tizen.Multimedia.Tests/testcase/MediaTool/TSVideoMediaFormat.cs index ba5f8eea0..95a8d3dec 100644 --- a/tct-suite-vs/Tizen.Multimedia.Tests/testcase/MediaTool/TSVideoMediaFormat.cs +++ b/tct-suite-vs/Tizen.Multimedia.Tests/testcase/MediaTool/TSVideoMediaFormat.cs @@ -66,6 +66,29 @@ namespace Tizen.Multimedia.Tests Assert.AreEqual(VALID_VIDEO_MAX_BPS, videoFormat.MaxBps); } + [Test] + [Category("P1")] + [Description("Create VideoMediaFormat")] + [Property("SPEC", "Tizen.Multimedia.VideoMediaFormat.VideoMediaFormat C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "MediaFormatVideoMimeType, int, int, int, int, int")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void VideoMediaFormat_PROPERTIES_ARE_SET_BY_CONSTRUCTOR_WITH_INT() + { + const MediaFormatVideoMimeType mimeType = MediaFormatVideoMimeType.Argb; + + var videoFormat = new VideoMediaFormat(mimeType, VALID_VIDEO_WIDTH, + VALID_VIDEO_HEIGHT, VALID_VIDEO_FRAME_RATE, VALID_VIDEO_BIT_RATE, VALID_VIDEO_MAX_BPS); + + Assert.AreEqual(mimeType, videoFormat.MimeType); + Assert.AreEqual(VALID_VIDEO_WIDTH, videoFormat.Size.Width); + Assert.AreEqual(VALID_VIDEO_HEIGHT, videoFormat.Size.Height); + Assert.AreEqual(VALID_VIDEO_FRAME_RATE, videoFormat.FrameRate); + Assert.AreEqual(VALID_VIDEO_BIT_RATE, videoFormat.BitRate); + Assert.AreEqual(VALID_VIDEO_MAX_BPS, videoFormat.MaxBps); + } + [Test] [Category("P2")] [Description("Throw if the specified mime type is invalid")] @@ -132,6 +155,31 @@ namespace Tizen.Multimedia.Tests Throws.TypeOf()); } + [Test] + [Category("P2")] + [Description("Throw if one of the specified parameters is invalid")] + [Property("SPEC", "Tizen.Multimedia.VideoMediaFormat.VideoMediaFormat C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTX")] + [Property("COVPARAM", "MediaFormatVideoMimeType, int, int, int, int, int")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void VideoMediaFormat_WITH_INVALID_SIZE_WITH_VALID_OTHERS() + { + Assert.That(() => new VideoMediaFormat(MediaFormatVideoMimeType.Argb, + INVALID_VIDEO_WIDTH, VALID_VIDEO_HEIGHT, + VALID_VIDEO_FRAME_RATE, + VALID_VIDEO_BIT_RATE, + VALID_VIDEO_MAX_BPS), + Throws.TypeOf()); + + Assert.That(() => new VideoMediaFormat(MediaFormatVideoMimeType.Argb, + VALID_VIDEO_WIDTH, INVALID_VIDEO_HEIGHT, + VALID_VIDEO_FRAME_RATE, + VALID_VIDEO_BIT_RATE, + VALID_VIDEO_MAX_BPS), + Throws.TypeOf()); + } + [Test] [Category("P2")] [Description("Throw if one of the specified parameters is invalid")]