Beispiel #1
0
        public void DocumentImagesAttributeShouldBeAddedToProfile()
        {
            var multiValueProtobufAttribute = TestTools.Attributes.CreateProtobufAttributeFromRawAnchor(TestData.TestAttributes.MultiValueAttribute);

            _yotiProfile = TestTools.Profile.CreateUserProfileWithSingleAttribute <List <Image> >(multiValueProtobufAttribute);

            List <Image> actualDocumentImages = _yotiProfile.DocumentImages.GetValue();

            AssertImages.ContainsExpectedImage(actualDocumentImages, "image/jpeg", "38TVEH/9k=");
            AssertImages.ContainsExpectedImage(actualDocumentImages, "image/jpeg", "vWgD//2Q==");
        }
Beispiel #2
0
        public void ShouldParseMultiValueAttribute()
        {
            var multiValueProtobufAttribute = TestTools.Attributes.CreateProtobufAttributeFromRawAnchor(TestData.TestAttributes.MultiValueAttribute);

            var imageList = (YotiAttribute <List <Image> >)AttributeConverter.ConvertToBaseAttribute(multiValueProtobufAttribute);

            List <Image> imageValues = imageList.GetValue();

            Assert.AreEqual(2, imageValues.Count);

            AssertImages.ContainsExpectedImage(imageValues, "image/jpeg", "38TVEH/9k=");
            AssertImages.ContainsExpectedImage(imageValues, "image/jpeg", "vWgD//2Q==");
        }