public void TestGetImageNotNull() { IObjectWithImage imgObj = JsonConvert.DeserializeObject <ObjectWithImage>(defaultJson); Assert.That(imgObj != null); Assert.That(string.IsNullOrEmpty(imgObj.GetPicture(PictureSize.Small)) == false); Assert.That(string.IsNullOrEmpty(imgObj.GetPicture(PictureSize.Medium)) == false); Assert.That(string.IsNullOrEmpty(imgObj.GetPicture(PictureSize.Large)) == false); Assert.That(string.IsNullOrEmpty(imgObj.GetPicture(PictureSize.ExtraLarge)) == false); }
public void TestHasImageCoverOnly() { IObjectWithImage imgObj = JsonConvert.DeserializeObject <ObjectWithImage>(coverOnlyJson); Assert.That(imgObj != null); Assert.That(imgObj.HasPicture(PictureSize.Small)); Assert.That(imgObj.HasPicture(PictureSize.Medium)); Assert.That(imgObj.HasPicture(PictureSize.Large)); Assert.That(imgObj.HasPicture(PictureSize.ExtraLarge)); }
public void TestHasImageWithMissingValues() { IObjectWithImage imgObj = JsonConvert.DeserializeObject <ObjectWithImage>(missingPictureJson); Assert.That(imgObj != null); Assert.That(imgObj.HasPicture(PictureSize.Small)); Assert.That(imgObj.HasPicture(PictureSize.ExtraLarge)); Assert.That(imgObj.HasPicture(PictureSize.Medium) == false); Assert.That(imgObj.HasPicture(PictureSize.Large) == false); }