Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void Test_HasPicture()
 {
     Assert.True(objectWithImage.HasPicture(PictureSize.Small));
     Assert.True(objectWithImage.HasPicture(PictureSize.Medium));
     Assert.True(objectWithImage.HasPicture(PictureSize.Large));
 }