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); }
/// <inheritdoc/> public override void FromDictionary(NSDictionary dictionary) { base.FromDictionary(dictionary); this.ImageSignature = dictionary.GetDataArray(nameof(this.ImageSignature)); }
public void GetDataArray_MissingKey_ReturnsNull() { var dict = new NSDictionary(); Assert.Null(dict.GetDataArray("missing")); }