Exemplo n.º 1
0
 public CoinItem(CoinImage image, IDictionary<string, string> metadata)
     : base(metadata)
 {
     Image = image;
 }
Exemplo n.º 2
0
        public void IfBothImagesAreEmptyWeDontHaveBackOrFrontTags()
        {
            var image = new CoinImage{FrontImage = new byte[0], RearImage = new byte[0]};

            var result = mapper.Map(image);

            Assert.IsNull(result.Element(CoinElementConstants.FrontImage));
            Assert.IsNull(result.Element(CoinElementConstants.RearImage));
        }
Exemplo n.º 3
0
        public void IfBothImagesAreEmptyWeDontCallImageMapper()
        {
            var image = new CoinImage{FrontImage = new byte[0], RearImage = new byte[0]};

// ReSharper disable once UnusedVariable
            var result = mapper.Map(image);
            imageMapper.Verify(x => x.Map(It.IsAny<byte[]>()), Times.Never);
        }
Exemplo n.º 4
0
        public void IfBothImagesAreEmptyWeStillHaveImageElement()
        {
            var image = new CoinImage{FrontImage = new byte[0], RearImage = new byte[0]};

            var result = mapper.Map(image);
            Assert.IsNotNull(result);
            Assert.AreEqual(CoinElementConstants.ImageTag, result.Name);
        }