Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EDDF3200C17 for ; Fri, 10 Feb 2017 17:55:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EC78B160B69; Fri, 10 Feb 2017 16:55:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4D741160B4E for ; Fri, 10 Feb 2017 17:55:09 +0100 (CET) Received: (qmail 41027 invoked by uid 500); 10 Feb 2017 16:55:03 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 40181 invoked by uid 99); 10 Feb 2017 16:55:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 16:55:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 37119F17CD; Fri, 10 Feb 2017 16:55:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stain@apache.org To: commits@commons.apache.org Date: Fri, 10 Feb 2017 16:55:15 -0000 Message-Id: <1a601ca84de24aa6a2bf687f6faa620f@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [13/45] commons-rdf git commit: COMMONSRDF-51: Use patterns for remove/contains archived-at: Fri, 10 Feb 2017 16:55:10 -0000 COMMONSRDF-51: Use patterns for remove/contains Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/c729469a Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/c729469a Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/c729469a Branch: refs/heads/COMMONSRDF-47 Commit: c729469aed46349b927d4038e67ff4fb5fa8ebd2 Parents: 448c20b Author: Stian Soiland-Reyes Authored: Mon Jan 23 11:50:23 2017 +0000 Committer: Stian Soiland-Reyes Committed: Mon Jan 23 11:50:23 2017 +0000 ---------------------------------------------------------------------- .../org/apache/commons/rdf/api/AbstractGraphTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/c729469a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java ---------------------------------------------------------------------- diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java index eba8888..e18ca08 100644 --- a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java +++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java @@ -410,7 +410,8 @@ public abstract class AbstractGraphTest { assertTrue(graph.contains(null, null, mixed)); // Remove should also honour any case - graph.remove(example1, greeting, mixed); + graph.remove(example1, null, mixed); + // no more greetings of any kind assertFalse(graph.contains(null, greeting, null)); } @@ -460,7 +461,8 @@ public abstract class AbstractGraphTest { assertTrue(g.contains(exampleTR, null, lowerROOT)); assertTrue(g.contains(exampleTR, null, mixed)); assertTrue(g.contains(exampleTR, null, mixedROOT)); - g.remove(exampleTR, greeting, mixed); + g.remove(exampleTR, null, mixed); + // No more greetings for exampleTR assertFalse(g.contains(exampleTR, null, null)); // What about the triple we added while in ROOT locale? @@ -470,8 +472,9 @@ public abstract class AbstractGraphTest { assertTrue(g.contains(exampleROOT, null, upper)); assertTrue(g.contains(exampleROOT, null, lower)); assertTrue(g.contains(exampleROOT, null, mixed)); - g.remove(exampleROOT, greeting, mixed); - assertFalse(g.contains(exampleROOT, null, null)); + g.remove(exampleROOT, null, mixed); + // No more greetings of any kind + assertFalse(g.contains(null, null, null)); } finally {