public void ImageItemInstantiation() { var options = new ImageItemOptions(); SetImageItemOptions(options); var image_item = new ImageItem("-1", "-1", options); AssertImageItem(image_item, options); AssertImageItem(image_item, image_item.GetOptions()); }
static void SetImageItemOptions(ImageItemOptions options) { SetItemOptions(options); options.LongDescription = "25"; options.Description = "26"; options.StorageMedium = "27"; options.Rating = "28"; options.Date = "29"; options.Publishers = new[] { "publisher" }; options.Rights = new[] { "right" }; }
static void AssertImageItem(ImageItem imageItem, ImageItemOptions options) { AssertItem(imageItem, options); Assert.AreEqual(imageItem.LongDescription, options.LongDescription); Assert.AreEqual(imageItem.Description, options.Description); Assert.AreEqual(imageItem.StorageMedium, options.StorageMedium); Assert.AreEqual(imageItem.Rating, options.Rating); Assert.AreEqual(imageItem.Date, options.Date); Assert.IsTrue(imageItem.Publishers.IsReadOnly); Assert.IsTrue(imageItem.Rights.IsReadOnly); CollectionAssert.AreEqual(imageItem.Publishers, options.Publishers); CollectionAssert.AreEqual(imageItem.Rights, options.Rights); }