public void GetBoolean_ReturnsValue() { var dict = new NSDictionary(); dict.Add("key", new NSNumber(true)); Assert.True(dict.GetBoolean("key")); }
/// <inheritdoc/> public override void FromDictionary(NSDictionary dictionary) { base.FromDictionary(dictionary); this.Goodbye = dictionary.GetBoolean(nameof(this.Goodbye)); }
public void GetBoolean_MissingKey_Throws() { var dict = new NSDictionary(); Assert.Throws <KeyNotFoundException>(() => dict.GetBoolean("missing")); }