public void Remove_po_rejects_missing_statements() { var d = new DynamicGraph(); var s = d.CreateBlankNode(); var p = d.CreateBlankNode(); Assert.False(d.Remove(s, p)); }
public void Remove_po_rejects_null_predicate_and_object() { var d = new DynamicGraph(); var s = d.CreateBlankNode(); Assert.False(d.Remove(s, null)); }
public void Contains_rejects_missing_subject() { var d = new DynamicGraph(); var s = d.CreateBlankNode(); Assert.False(d.Contains(s, 0)); }
public void Contains_rejects_null_value() { var d = new DynamicGraph(); var s = d.CreateBlankNode(); Assert.False(d.Contains(s, null)); }
public void Add_requires_value() { var d = new DynamicGraph(); var s = d.CreateBlankNode(); Assert.Throws <ArgumentNullException>(() => d.Add(s, null)); }
public void TryGetValue_rejects_missing_subject() { var d = new DynamicGraph(); var s = d.CreateBlankNode(); var condition = d.TryGetValue(s, out var value); Assert.False(condition); Assert.Null(value); }
public void Add_fails_unknown_key_type() { var g = new DynamicGraph(predicateBaseUri: UriFactory.Create("urn:")); var s = g.CreateBlankNode(); var predicateAndObjects = new Dictionary <object, object> { { 0, "o" } }; Assert.Throws <InvalidOperationException>(() => g.Add(s, predicateAndObjects)); }