Exemple #1
0
        public void GetDataArray_ReturnsValue()
        {
            var entry = new byte[] { 1, 2, 3, 4 };
            var array = new NSArray();

            array.Add(new NSData(entry));

            var dict = new NSDictionary();

            dict.Add("key", array);

            var value = Assert.Single(dict.GetDataArray("key"));

            Assert.Equal(entry, value);
        }
Exemple #2
0
        /// <inheritdoc/>
        public override void FromDictionary(NSDictionary dictionary)
        {
            base.FromDictionary(dictionary);

            this.ImageSignature = dictionary.GetDataArray(nameof(this.ImageSignature));
        }
Exemple #3
0
        public void GetDataArray_MissingKey_ReturnsNull()
        {
            var dict = new NSDictionary();

            Assert.Null(dict.GetDataArray("missing"));
        }