[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "int, int, int, int")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Rectangle_WITH_INTS()
+ public void Rectangle_WITH_INTS()
{
Assert.That(() => new Rectangle(0, 1, 2, 3), Throws.Nothing);
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void X_READWRITE()
+ public void X_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.X = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Y_READWRITE()
+ public void Y_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.Y = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Width_READWRITE()
+ public void Width_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.Width = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Height_READWRITE()
+ public void Height_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.Height = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Left_READONLY()
+ public void Left_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Top_READONLY()
+ public void Top_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Right_READONLY()
+ public void Right_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Bottom_READONLY()
+ public void Bottom_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Equality_CHECK()
+ public void Equality_CHECK()
{
Assert.That(new Rectangle(0, 1, 2, 3) == new Rectangle(0, 1, 2, 3), Is.True);
Assert.That(new Rectangle(0, 1, 2, 3) == new Rectangle(0, 0, 0, 0), Is.False);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Inequality_CHECK()
+ public void Inequality_CHECK()
{
Assert.That(new Rectangle(0, 1, 2, 3) != new Rectangle(0, 1, 2, 3), Is.False);
Assert.That(new Rectangle(0, 1, 2, 3) != new Rectangle(0, 0, 0, 0), Is.True);
}
+ [Test]
+ [Category("P1")]
+ [Description("Compares two rectangles with Equals")]
+ [Property("SPEC", "Tizen.Content.MediaContent.Rectangle.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ Assert.That(new Rectangle(0, 1, 2, 3).Equals(new Rectangle(0, 1, 2, 3)), Is.True);
+ Assert.That(new Rectangle(0, 1, 2, 3).Equals(new Rectangle(0, 0, 0, 0)), Is.False);
+ }
}
}
{
Assert.Throws<InvalidOperationException>(() => _device.GetAvoidResampling());
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares AudioDevice instances with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.AudioDevice.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ var device = AudioManager.GetConnectedDevices().First();
+ Assert.That(_device.Equals(device), Is.True);
+ }
}
}
{
[TestFixture]
[Description("Testing Tizen.Multimedia.CodecNotSupportedException class")]
- public static class CodecNotSupportedExceptionTests
+ public class CodecNotSupportedExceptionTests
{
[Test]
[Category("P1")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "Tizen.Multimedia.CodecKind")]
- public static void CodecNotSupportedException_CONSTRUCTOR_WITH_KIND()
+ public void CodecNotSupportedException_CONSTRUCTOR_WITH_KIND()
{
Assert.DoesNotThrow(() => new CodecNotSupportedException(CodecKind.Audio));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "Tizen.Multimedia.CodecKind, string")]
- public static void CodecNotSupportedException_CONSTRUCTOR_WITH_KIND_MESSAGE()
+ public void CodecNotSupportedException_CONSTRUCTOR_WITH_KIND_MESSAGE()
{
Assert.DoesNotThrow(() => new CodecNotSupportedException(CodecKind.Video, "message"));
}
[Property("SPEC", "Tizen.Multimedia.CodecNotSupportedException.CodecKind A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
- public static void CodecKind_READONLY()
+ public void CodecKind_READONLY()
{
Assert.AreEqual(new CodecNotSupportedException(CodecKind.Audio).CodecKind, CodecKind.Audio);
}
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "MediaView")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Display_WITH_MEDIA_VIEW()
+ public void Display_WITH_MEDIA_VIEW()
{
try
{
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "Window")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Display_WITH_WINDOW()
+ public void Display_WITH_WINDOW()
{
Assert.That(() => new Display(new ElmSharp.Window("Test window")), Throws.Nothing);
}
{
[TestFixture]
[Description("Testing Tizen.Multimedia.FileFormatException class")]
- public static class FileFormatExceptionTests
+ public class FileFormatExceptionTests
{
[Test]
[Category("P1")]
[Property("SPEC", "Tizen.Multimedia.FileFormatException.FileFormatException C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
- public static void FileFormatException_DEFAULT_CONSTRUCTOR()
+ public void FileFormatException_DEFAULT_CONSTRUCTOR()
{
Assert.DoesNotThrow(() => new FileFormatException());
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "string")]
- public static void FileFormatException_CONSTRUCTOR_WITH_MESSAGE()
+ public void FileFormatException_CONSTRUCTOR_WITH_MESSAGE()
{
Assert.DoesNotThrow(() => new FileFormatException("message"));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Point_CONSTRUCTOR()
+ public void Point_CONSTRUCTOR()
{
Assert.That(() => new Point(0, 100), Throws.Nothing);
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void X_READWRITE()
+ public void X_READWRITE()
{
var point = new Point(0, 100);
point.X = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Y_READWRITE()
+ public void Y_READWRITE()
{
var point = new Point(0, 100);
point.Y = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Equality_CHECK()
+ public void Equality_CHECK()
{
Assert.That(new Point(0, 100) == new Point(0, 100), Is.True);
Assert.That(new Point(0, 1) == new Point(0, 0), Is.False);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Inequality_CHECK()
+ public void Inequality_CHECK()
{
Assert.That(new Point(0, 100) != new Point(0, 100), Is.False);
Assert.That(new Point(0, 1) != new Point(0, 0), Is.True);
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares two points with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.Point.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ Assert.That(new Point(0, 100).Equals(new Point(0, 100)), Is.True);
+ Assert.That(new Point(0, 1).Equals(new Point(0, 0)), Is.False);
+ }
}
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Range_CONSTRUCTOR()
+ public void Range_CONSTRUCTOR()
{
Assert.That(() => new Range(0, 100), Throws.Nothing);
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public static void Range_THROWS_EXCEPTION_IF_PARAM_IS_INVALID()
+ public void Range_THROWS_EXCEPTION_IF_PARAM_IS_INVALID()
{
Assert.Throws<ArgumentException>(() => new Range(0, -1));
}
[Property("SPEC", "Tizen.Multimedia.Range.Min A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- public static void Min_PROPERTY_READ_WRITE()
+ public void Min_PROPERTY_READ_WRITE()
{
Assert.AreEqual(new Range(0, 100).Min, 0, "Min value is not same as set value");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public static void Max_PROPERTY_READ_WRITE()
+ public void Max_PROPERTY_READ_WRITE()
{
Assert.AreEqual(new Range(0, 100).Max, 100, "Max value is not same as set value");
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Length_READONLY()
+ public void Length_READONLY()
{
Assert.That(new Range(1, 100).Length, Is.EqualTo(99));
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Equality_CHECK()
+ public void Equality_CHECK()
{
Assert.That(new Range(0, 100) == new Range(0, 100), Is.True);
Assert.That(new Range(0, 1) == new Range(0, 0), Is.False);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Inequality_CHECK()
+ public void Inequality_CHECK()
{
Assert.That(new Range(0, 100) != new Range(0, 100), Is.False);
Assert.That(new Range(0, 1) != new Range(0, 0), Is.True);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void IsInside_CHECK()
+ public void IsInside_CHECK()
{
Assert.That(new Range(0, 100).IsInside(0), Is.True);
Assert.That(new Range(0, 1).IsInside(-1), Is.False);
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares two ranges with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.Range.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ Assert.That(new Range(0, 100).Equals(new Range(0, 100)), Is.True);
+ Assert.That(new Range(0, 1).Equals(new Range(0, 0)), Is.False);
+ }
}
}
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "int, int, int, int")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Rectangle_WITH_INTS()
+ public void Rectangle_WITH_INTS()
{
Assert.That(() => new Rectangle(0, 1, 2, 3), Throws.Nothing);
}
[Property("CRITERIA", "CONSTR")]
[Property("COVPARAM", "Point, Size")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Rectangle_WITH_POINT_SIZE()
+ public void Rectangle_WITH_POINT_SIZE()
{
Assert.That(() => new Rectangle(new Point(0, 1), new Size(2, 3)), Throws.Nothing);
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Location_READWRITE()
+ public void Location_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
var newLoc = new Point(1, 1);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Size_READWRITE()
+ public void Size_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
var newSize = new Size(1, 1);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void X_READWRITE()
+ public void X_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.X = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Y_READWRITE()
+ public void Y_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.Y = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Width_READWRITE()
+ public void Width_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.Width = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Height_READWRITE()
+ public void Height_READWRITE()
{
var rectangle = new Rectangle(0, 0, 0, 0);
rectangle.Height = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Left_READONLY()
+ public void Left_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Top_READONLY()
+ public void Top_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Right_READONLY()
+ public void Right_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Bottom_READONLY()
+ public void Bottom_READONLY()
{
var rectangle = new Rectangle(1, 2, 3, 4);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Equality_CHECK()
+ public void Equality_CHECK()
{
Assert.That(new Rectangle(0, 1, 2, 3) == new Rectangle(0, 1, 2, 3), Is.True);
Assert.That(new Rectangle(0, 1, 2, 3) == new Rectangle(0, 0, 0, 0), Is.False);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Inequality_CHECK()
+ public void Inequality_CHECK()
{
Assert.That(new Rectangle(0, 1, 2, 3) != new Rectangle(0, 1, 2, 3), Is.False);
Assert.That(new Rectangle(0, 1, 2, 3) != new Rectangle(0, 0, 0, 0), Is.True);
}
+ [Test]
+ [Category("P1")]
+ [Description("Compares two rectangles with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.Rectangle.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ Assert.That(new Rectangle(0, 1, 2, 3).Equals(new Rectangle(0, 1, 2, 3)), Is.True);
+ Assert.That(new Rectangle(0, 1, 2, 3).Equals(new Rectangle(0, 0, 0, 0)), Is.False);
+ }
}
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Size_CONSTRUCTOR()
+ public void Size_CONSTRUCTOR()
{
Assert.That(() => new Size(0, 100), Throws.Nothing);
}
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Width_READWRITE()
+ public void Width_READWRITE()
{
var size = new Size(0, 100);
size.Width = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Height_READWRITE()
+ public void Height_READWRITE()
{
var size = new Size(0, 100);
size.Height = -1;
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Equality_CHECK()
+ public void Equality_CHECK()
{
Assert.That(new Size(0, 100) == new Size(0, 100), Is.True);
Assert.That(new Size(0, 1) == new Size(0, 0), Is.False);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public static void Inequality_CHECK()
+ public void Inequality_CHECK()
{
Assert.That(new Size(0, 100) != new Size(0, 100), Is.False);
Assert.That(new Size(0, 1) != new Size(0, 0), Is.True);
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares two Sizes with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.Size.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ Assert.That(new Size(0, 100).Equals(new Size(0, 100)), Is.True);
+ Assert.That(new Size(0, 1).Equals(new Size(0, 0)), Is.False);
+ }
}
}
{
AssertHelper.PropertyReadOnly<AudioMediaFormat>(nameof(AudioMediaFormat.SampleRate));
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares AudioMediaFormat instances with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.AudioMediaFormat.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ const MediaFormatAudioMimeType mimeType = MediaFormatAudioMimeType.Aac;
+
+ var audioFormat = new AudioMediaFormat(mimeType, VALID_AUDIO_CHANNEL,
+ VALID_AUDIO_SAMPLE_RATE, VALID_AUDIO_BIT, VALID_AUDIO_BIT_RATE);
+
+ var audioFormat2 = new AudioMediaFormat(mimeType, VALID_AUDIO_CHANNEL,
+ VALID_AUDIO_SAMPLE_RATE, VALID_AUDIO_BIT, VALID_AUDIO_BIT_RATE);
+
+ var audioFormat3 = new AudioMediaFormat(mimeType, VALID_AUDIO_CHANNEL + 1,
+ VALID_AUDIO_SAMPLE_RATE, VALID_AUDIO_BIT, VALID_AUDIO_BIT_RATE);
+
+ Assert.That(audioFormat.Equals(audioFormat2), Is.True);
+ Assert.That(audioFormat.Equals(audioFormat3), Is.False);
+ }
}
}
{
AssertHelper.PropertyReadOnly<ContainerMediaFormat>(nameof(ContainerMediaFormat.MimeType));
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares ContainerMediaFormat instances with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.ContainerMediaFormat.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ const MediaFormatContainerMimeType mimeType = MediaFormatContainerMimeType.AacAdif;
+ const MediaFormatContainerMimeType mimeType2 = MediaFormatContainerMimeType.MP4;
+
+ var container = new ContainerMediaFormat(mimeType);
+ var container2 = new ContainerMediaFormat(mimeType);
+ var container3 = new ContainerMediaFormat(mimeType2);
+
+ Assert.That(container.Equals(container2), Is.True);
+ Assert.That(container.Equals(container3), Is.False);
+ }
}
}
{
AssertHelper.PropertyReadOnly<TextMediaFormat>(nameof(TextMediaFormat.TextType));
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares TextMediaFormat instances with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.TextMediaFormat.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ const MediaFormatTextMimeType mimeType = MediaFormatTextMimeType.MP4;
+ const MediaFormatTextType textType = MediaFormatTextType.MP4;
+ const MediaFormatTextType textType2 = MediaFormatTextType.ThreeGpp;
+
+ var textFormat = new TextMediaFormat(mimeType, textType);
+ var textFormat2 = new TextMediaFormat(mimeType, textType);
+ var textFormat3 = new TextMediaFormat(mimeType, textType2);
+
+ Assert.That(textFormat.Equals(textFormat2), Is.True);
+ Assert.That(textFormat.Equals(textFormat3), Is.False);
+ }
}
}
VALID_VIDEO_MAX_BPS);
Assert.AreEqual(VALID_VIDEO_MAX_BPS, videoFormat.MaxBps);
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Compares VideoMediaFormat instances with Equals")]
+ [Property("SPEC", "Tizen.Multimedia.VideoMediaFormat.Equals M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Equals_CHECK()
+ {
+ var videoFormat = new VideoMediaFormat(MediaFormatVideoMimeType.Argb,
+ new Size(VALID_VIDEO_WIDTH, VALID_VIDEO_HEIGHT),
+ VALID_VIDEO_FRAME_RATE, VALID_VIDEO_BIT_RATE,
+ VALID_VIDEO_MAX_BPS);
+
+ var videoFormat2 = new VideoMediaFormat(MediaFormatVideoMimeType.Argb,
+ new Size(VALID_VIDEO_WIDTH, VALID_VIDEO_HEIGHT),
+ VALID_VIDEO_FRAME_RATE, VALID_VIDEO_BIT_RATE,
+ VALID_VIDEO_MAX_BPS);
+
+ var videoFormat3 = new VideoMediaFormat(MediaFormatVideoMimeType.Argb,
+ new Size(VALID_VIDEO_WIDTH, VALID_VIDEO_HEIGHT),
+ VALID_VIDEO_FRAME_RATE, VALID_VIDEO_BIT_RATE,
+ VALID_VIDEO_MAX_BPS + 10);
+
+ Assert.That(videoFormat.Equals(videoFormat2), Is.True);
+ Assert.That(videoFormat.Equals(videoFormat3), Is.False);
+ }
}
}