public void ParseIfd0Directory_NullDirectory_NoMetadata() { ExifIfd0Directory ifd0Directory = null; var photo = new Photo(""); ifd0Directory.Parse(photo); Assert.Null(photo.Make); Assert.Null(photo.Model); Assert.Null(photo.DateTime); }
public void ParseIfd0Directory_ValidDirectory_AllMetadata() { var ifd0Directory = new ExifIfd0Directory(); var photo = new Photo(""); var make = "TestMake"; var model = "TestModel"; var dateTime = DateTime.Today; ifd0Directory.Set(ExifIfd0Directory.TagMake, make); ifd0Directory.Set(ExifIfd0Directory.TagModel, model); ifd0Directory.Set(ExifIfd0Directory.TagDateTime, dateTime); ifd0Directory.Parse(photo); var actualMake = photo.Make; var actualModel = photo.Model; var actualDateTime = photo.DateTime; Assert.Equal(make, actualMake); Assert.Equal(model, actualModel); Assert.Equal(dateTime, actualDateTime); }