private readonly string[] _fileFormat = { ".flac", ".mp3", ".ogg", ".wav" };
private readonly string _originPath = "/opt/usr/home/owner/share/res/test_editor";
private readonly string _filePath = "/opt/usr/home/owner/share/res/copied";
+ private readonly string _filePathNotExist = "/opt/usr/home/owner/share/res/not_exist";
private readonly string _artworkPath = "/opt/usr/home/owner/share/res/test_artwork.jpg";
[SetUp]
[Property("AUTHOR", "Minje Ahn, minje.ahn@samsung.com")]
public void MetadataEditor_CHECK_CREATE_CONSTRUCTOR_WITH_NULL_PATH()
{
- Assert.That(() => new MetadataEditor(null), Throws.ArgumentNullException);
+ Assert.That(() => new MetadataEditor(null), Throws.ArgumentNullException,
+ "Should throws proper exception");
}
[Test]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTX")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void MetadataEditor_THROWS_IF_PATH_EMPTY()
+ public void MetadataEditor_THROWS_IF_PATH_WHITE_SPACE_STRING()
{
- Assert.That(() => new MetadataEditor(" "), Throws.ArgumentException);
+ Assert.That(() => new MetadataEditor(" "), Throws.ArgumentException,
+ "Should throws proper exception");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Throws if path is empty string")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.MetadataEditor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void MetadataEditor_THROWS_IF_PATH_EMPTY_STRING()
+ {
+ Assert.That(() => new MetadataEditor(""), Throws.ArgumentException,
+ "Should throws proper exception");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Throws if files does not exist")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.MetadataEditor C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void MetadataEditor_THROWS_IF_FILE_NOT_EXIST()
+ {
+ Assert.That(() => new MetadataEditor(_filePathNotExist), Throws.TypeOf<FileNotFoundException>(),
+ "Should throws proper exception");
}
[Test]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Artist A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Artist_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Artist, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Title Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Title A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Title_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Title, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Album Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Album A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Album_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Album, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Genre Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Genre A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Genre_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Genre, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Author Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Author A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Author_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Author, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Copyright Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Copyright A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Copyright_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Copyright, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Date Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Date A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Date_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Date, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Description Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Description A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Description_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Description, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Comment Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Comment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Comment_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Comment, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.TrackNumber Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.TrackNumber A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void TrackNumber_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.TrackNumber, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.PictureCount Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.PictureCount A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void PictureCount_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.PictureCount, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.Conductor Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Conductor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Conductor_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.Conductor, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test for MetadataEditor.UnsyncLyrics Property")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.UnsyncLyrics A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void UnsyncLyrics_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.That(() => metadata.UnsyncLyrics, Throws.TypeOf<ObjectDisposedException>(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test when get the artwork from the test media using GetPicture method")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.GetPicture M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetPicture_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => metadata.GetPicture(0),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test when append the artwork to the test media using AddPicture method")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.AddPicture M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void AddPicture_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => metadata.AddPicture(_artworkPath),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test when remove the artwork from the test media using RemovePicture method")]
}
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.RemovePicture M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void RemovePicture_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => metadata.RemovePicture(0),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Test when writing a file using Commit method")]
}
}
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Test when writing a file using Commit method")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataEditor.Commit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Commit_THROWS_IF_DISPOSED()
+ {
+ var metadata = new MetadataEditor(_filePath + _fileFormat[0]);
+ metadata.Artist = "Artist";
+
+ metadata.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => metadata.Commit(),
+ "Should throws proper exception");
+ }
}
}
Assert.IsNotNull(_metadataExtractor.GetMetadata());
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataExtractor.GetMetadata M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetMetadata_THROWS_IF_DISPOSED()
+ {
+ _metadataExtractor.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _metadataExtractor.GetMetadata(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Get Artwork information and check existence")]
Log.Info(LogTag, "MetadataExtractor Test GetArtwork finished");
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataExtractor.GetArtwork M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetArtwork_THROWS_IF_DISPOSED()
+ {
+ _metadataExtractor.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _metadataExtractor.GetArtwork(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Get video thumbnail and check created thumbnail")]
Log.Info(LogTag, "MetadataExtractor Test GetVideoThumbnail finished");
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataExtractor.GetVideoThumbnail M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetVideoThumbnail_THROWS_IF_DISPOSED()
+ {
+ _metadataExtractor.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _metadataExtractor.GetVideoThumbnail(),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Get frame data of specified time and check created frame")]
Log.Info(LogTag, "MetadataExtractor Test GetFrameAt finished");
}
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataExtractor.GetFrameAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetFrameAt_THROWS_IF_DISPOSED()
+ {
+ _metadataExtractor.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _metadataExtractor.GetFrameAt(1, true),
+ "Should throws proper exception");
+ }
+
[Test]
[Category("P1")]
[Description("Get Synchronized lyrics information and check existence")]
Assert.IsNull(_metadataExtractor.GetSyncLyrics(1));
Log.Info(LogTag, "MetadataExtractor Test GetSyncLyrics finished");
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Throws if object is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.MetadataExtractor.GetSyncLyrics M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetSyncLyrics_THROWS_IF_DISPOSED()
+ {
+ _metadataExtractor.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _metadataExtractor.GetSyncLyrics(1),
+ "Should throws proper exception");
+ }
}
}