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>()); }
/// <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); } }
/// <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); } }
/// <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(); }