[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.BitPerSample A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void BitPerSample_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.BitPerSample, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.BitRate A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void BitRate_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.BitRate, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Channels A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Channels_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Channels, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Composer A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Copyright A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Copyright_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Copyright, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.DateAdded A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Description A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Description_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Description, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.DisplayName A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.ExposureTime A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void ExposureTime_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.ExposureTime, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Favorite A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.FNumber A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void FNumber_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.FNumber, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Genre A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Iso A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Iso_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Iso, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Latitude A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Model A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Model_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Model, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Orientation A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Orientation_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Orientation, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Path A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
[Test]
[Category("P1")]
[Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.Rating A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Rating_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.Rating, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.SampleRate A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SampleRate_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.SampleRate, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
- [Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.StorageType A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void StorageType_READ_ONLY()
- {
- Assert.That(MediaInfoColumns.StorageType, Is.Not.Empty);
- }
-
- [Test]
- [Category("P1")]
- [Description("Is read only")]
[Property("SPEC", "Tizen.Content.MediaContent.MediaInfoColumns.ThumbnailPath A")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRO")]
+++ /dev/null
-using NUnit.Framework;
-using System;
-
-namespace Tizen.Content.MediaContent.Tests
-{
- [TestFixture]
- [Description("Tizen.Content.MediaContent.StorageCommand Tests")]
- public class StorageCommandTests : TestBase
- {
- private StorageCommand _cmd;
-
- [SetUp]
- public void SetUp()
- {
- _cmd = new StorageCommand(_database);
- }
-
- [Test]
- [Category("P1")]
- [Description("Test for StorageCommand constructor")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.StorageCommand C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void StorageCommand_CONSTRUCTOR()
- {
- Assert.That(() => new StorageCommand(_database), Throws.Nothing);
- }
-
- [Test]
- [Category("P2")]
- [Description("StorageCommand throws if the database is null")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.StorageCommand C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void StorageCommand_CONSTRUCTOR_WITH_NULL()
- {
- Assert.That(() => new StorageCommand(null), Throws.ArgumentNullException);
- }
-
- [Test]
- [Category("P2")]
- [Description("StorageCommand throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.StorageCommand C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void StorageCommand_CONSTRUCTOR_WITH_DISPOSED()
- {
- _database.Dispose();
-
- Assert.That(() => new StorageCommand(_database), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P1")]
- [Description("Test for Count")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Count M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Count_RETURN()
- {
- Assert.That(() => _cmd.Count(), Throws.Nothing);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Count M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Count_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.Count(), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Count M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Count_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.Count(), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P1")]
- [Description("Test for Count with arguments")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Count M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "CountArguments")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Count_WITH_ARGUMENTS()
- {
- Assert.That(() => _cmd.Count(new CountArguments()), Throws.Nothing);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Count M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "CountArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Count_WITH_ARGS_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.Count(null), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Count M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "CountArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Count_WITH_ARGS_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.Count(null), Throws.TypeOf<ObjectDisposedException>());
- }
-
- #region Select
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.Select(), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.Select(), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P1")]
- [Description("Select returns a reader that contains result")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_RETURN_CHECK()
- {
- Assert.That(() => _cmd.Select().Read(), Throws.Nothing);
- }
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "SelectArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_ARGS_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.Select(arguments: null), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "SelectArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_ARGS_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.Select(arguments: null), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P1")]
- [Description("Select returns a reader that contains result")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "SelectArguments")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_ARGS()
- {
- var arguments = new SelectArguments { TotalRowCount = 1 };
-
- var reader = _cmd.Select(arguments);
- Assert.That(() => reader.Read(), Throws.Nothing);
- }
-
- #endregion
-
- #region Select
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("COVPARAM", "string")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_ID_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.Select("someid"), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("COVPARAM", "string")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_ID_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.Select("someid"), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P2")]
- [Description("Select throws if the id is null")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MEX")]
- [Property("COVPARAM", "string")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_THROWS_IF_ID_NULL()
- {
- Assert.That(() => _cmd.Select(storageId: null), Throws.ArgumentNullException);
- }
-
- [Test]
- [Category("P1")]
- [Description("Select throws if the id is white-space string")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "string")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_INVALID_ID()
- {
- Assert.That(() => _cmd.Select(" "), Throws.ArgumentException);
- }
-
- [Test]
- [Category("P1")]
- [Description("Select with id returns Storage object")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.Select M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "string")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void Select_WITH_ID()
- {
- Assert.That(_cmd.Select("someid"), Is.Null);
- }
-
- #endregion
-
- #region CountMedia
-
- [Test]
- [Category("P1")]
- [Description("Test for CountMedia")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_RETURN()
- {
- Assert.That(_cmd.CountMedia("someid"), Is.Zero);
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the id is null")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_THROWS_IF_ID_NULL()
- {
- Assert.That(() => _cmd.CountMedia(null), Throws.ArgumentNullException);
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the id is white-space string")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_THROWS_IF_ID_INVALID()
- {
- Assert.That(() => _cmd.CountMedia(" "), Throws.ArgumentException);
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.CountMedia("someid"), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.CountMedia("someid"), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P1")]
- [Description("Test for CountMedia")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, CountArguments")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_WITH_ARGS_RETURN()
- {
- var arguments = new CountArguments()
- {
- FilterExpression = $"{StorageColumns.Type}={(int)StorageType.External}"
- };
-
- Assert.That(_cmd.CountMedia("someid", arguments), Is.Zero);
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the id is null")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, CountArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_WITH_ARGS_THROWS_IF_ID_NULL()
- {
- Assert.That(() => _cmd.CountMedia(null, null), Throws.ArgumentNullException);
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the id is empty string")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, CountArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_WITH_ARGS_THROWS_IF_ID_OUT_OF_RANGE()
- {
- Assert.That(() => _cmd.CountMedia("", null), Throws.ArgumentException);
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, CountArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_WITH_ARGS_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.CountMedia("someid", null), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P2")]
- [Description("CountMedia throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.CountMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, CountArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void CountMedia_WITH_ARGS_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.CountMedia("someid", null), Throws.InvalidOperationException);
- }
- #endregion
-
- #region SelectMedia
-
- [Test]
- [Category("P1")]
- [Description("Test for SelectMedia")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_RETURN()
- {
- Assert.That(_cmd.SelectMedia("someid").Read(), Is.False);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if id is null")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_THROWS_IF_ID_NULL()
- {
- Assert.That(() => _cmd.SelectMedia(null), Throws.ArgumentNullException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if id is white-space string")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_THROWS_IF_ID_INVALID()
- {
- Assert.That(() => _cmd.SelectMedia(" "), Throws.ArgumentException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.SelectMedia("someid"), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.SelectMedia("someid"), Throws.InvalidOperationException);
- }
-
- [Test]
- [Category("P1")]
- [Description("Test for SelectMedia")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, SelectArguments")]
- [Property("CRITERIA", "MR")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_WITH_ARGS()
- {
- var arguments = new SelectArguments { TotalRowCount = 1 };
-
- var reader = _cmd.SelectMedia("someid", arguments);
- Assert.That(reader.Read(), Is.False);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if id is null")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, SelectArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_WITH_ARGS_THROWS_IF_ID_NULL()
- {
- Assert.That(() => _cmd.SelectMedia(null, null), Throws.ArgumentNullException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if id is white-space string")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, SelectArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_WITH_ARGS_THROWS_IF_ID_INVALID()
- {
- Assert.That(() => _cmd.SelectMedia(" ", null), Throws.ArgumentException);
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disposed")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, SelectArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_WITH_ARGS_THROWS_IF_DB_DISPOSED()
- {
- _database.Dispose();
- Assert.That(() => _cmd.SelectMedia("someid", null), Throws.TypeOf<ObjectDisposedException>());
- }
-
- [Test]
- [Category("P2")]
- [Description("Throws if the database has already been disconnected")]
- [Property("SPEC", "Tizen.Content.MediaContent.StorageCommand.SelectMedia M")]
- [Property("SPEC_URL", "-")]
- [Property("COVPARAM", "string, SelectArguments")]
- [Property("CRITERIA", "MEX")]
- [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
- public void SelectMedia_WITH_ARGS_THROWS_IF_DB_DISCONNECTED()
- {
- _database.Disconnect();
- Assert.That(() => _cmd.SelectMedia("someid", null), Throws.InvalidOperationException);
- }
- #endregion
-
- }
-}