From 6987f927fe4e29a0c8f1594e0a0558554f8b620f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Sep 2016 19:21:18 +0100 Subject: [PATCH] {Immutable}NodeItemTest: categorise findInPath tests --- .../java/net/kemitix/node/ImmutableNodeItemTest.java | 9 +++++++-- src/test/java/net/kemitix/node/NodeItemTest.java | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/kemitix/node/ImmutableNodeItemTest.java b/src/test/java/net/kemitix/node/ImmutableNodeItemTest.java index 9475ff5..91eee8a 100644 --- a/src/test/java/net/kemitix/node/ImmutableNodeItemTest.java +++ b/src/test/java/net/kemitix/node/ImmutableNodeItemTest.java @@ -4,14 +4,15 @@ import lombok.val; import org.assertj.core.api.SoftAssertions; import org.junit.Rule; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; -import static org.assertj.core.api.Assertions.assertThat; - import java.util.Arrays; import java.util.Collections; import java.util.Optional; +import static org.assertj.core.api.Assertions.assertThat; + /** * Test for {@link ImmutableNodeItem}. * @@ -141,6 +142,7 @@ public class ImmutableNodeItemTest { * Test that we can walk a tree to the target node. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldWalkTreeToNode() { //given val root = Nodes.unnamedRoot("root"); @@ -160,6 +162,7 @@ public class ImmutableNodeItemTest { * doesn't exist. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldNotFindNonExistentChildNode() { //given val root = Nodes.unnamedRoot("root"); @@ -176,6 +179,7 @@ public class ImmutableNodeItemTest { * Test that when we pass null we get an exception. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldThrowNEWhenWalkTreeNull() { //given immutableNode = Nodes.asImmutable(Nodes.unnamedRoot("subject")); @@ -190,6 +194,7 @@ public class ImmutableNodeItemTest { * a result. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldReturnEmptyForEmptyWalkTreePath() { //given immutableNode = Nodes.asImmutable(Nodes.unnamedRoot("subject")); diff --git a/src/test/java/net/kemitix/node/NodeItemTest.java b/src/test/java/net/kemitix/node/NodeItemTest.java index 247e7fb..2702ae0 100644 --- a/src/test/java/net/kemitix/node/NodeItemTest.java +++ b/src/test/java/net/kemitix/node/NodeItemTest.java @@ -4,14 +4,15 @@ import lombok.val; import org.assertj.core.api.SoftAssertions; import org.junit.Rule; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; -import static org.assertj.core.api.Assertions.assertThat; - import java.util.Arrays; import java.util.Collections; import java.util.Optional; +import static org.assertj.core.api.Assertions.assertThat; + /** * Test for {@link NodeItem}. * @@ -309,6 +310,7 @@ public class NodeItemTest { * Test that we can walk a tree to the target node. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldWalkTreeToNode() { //given val grandparent = "grandparent"; @@ -334,6 +336,7 @@ public class NodeItemTest { * doesn't exist. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldNotFindNonExistentChildNode() { //given val parent = "parent"; @@ -352,6 +355,7 @@ public class NodeItemTest { * Test that when we pass null we get an exception. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldThrowNEWhenWalkTreeNull() { //given node = Nodes.unnamedRoot("subject"); @@ -366,6 +370,7 @@ public class NodeItemTest { * a result. */ @Test + @Category(NodeFindInPathTestsCategory.class) public void shouldReturnEmptyForEmptyWalkTreePath() { //given node = Nodes.unnamedRoot("subject");