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>());
 }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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();
		}
Esempio n. 6
0
 public virtual void Setup()
 {
     _directory = new MockDirectory();
 }