public virtual void TestGetOrCreateDirectoryReturnsSameInstance()
 {
     Com.Drew.Metadata.Metadata  metadata  = new Com.Drew.Metadata.Metadata();
     Com.Drew.Metadata.Directory directory = metadata.GetOrCreateDirectory <ExifSubIFDDirectory>();
     NUnit.Framework.Assert.AreSame(directory, metadata.GetOrCreateDirectory <ExifSubIFDDirectory>());
     NUnit.Framework.Assert.AreNotSame(directory, metadata.GetOrCreateDirectory <IptcDirectory>());
 }
Example #2
0
        /// <exception cref="System.IO.IOException"/>
        private void SetInt64([NotNull] Com.Drew.Metadata.Directory directory, int tagType, [NotNull] RandomAccessReader reader)
        {
            long l = reader.GetInt64(tagType);

            if (l != 0)
            {
                directory.SetLong(tagType, l);
            }
        }
Example #3
0
        /// <exception cref="System.IO.IOException"/>
        private void SetInt32([NotNull] Com.Drew.Metadata.Directory directory, int tagType, [NotNull] RandomAccessReader reader)
        {
            int i = reader.GetInt32(tagType);

            if (i != 0)
            {
                directory.SetInt(tagType, i);
            }
        }
Example #4
0
        /// <exception cref="System.IO.IOException"/>
        private void Set4ByteString([NotNull] Com.Drew.Metadata.Directory directory, int tagType, [NotNull] RandomAccessReader reader)
        {
            int i = reader.GetInt32(tagType);

            if (i != 0)
            {
                directory.SetString(tagType, GetStringFromInt32(i));
            }
        }
		public virtual void Setup()
		{
			_directory = new MockDirectory();
		}
Example #6
0
 public virtual void Setup()
 {
     _directory = new MockDirectory();
 }