コード例 #1
0
 @Test(expected = AssertionError.class)
 public void testAssertThat_node_has_no_children_fails_when_node_has_children() {
   final Node root = new DefaultNode(String.class);
   final Node child = new DefaultNode(root, mock(Accessor.class), String.class);
   root.addChild(child);
   assertThat(root).node().hasNoChildren();
 }
コード例 #2
0
 @Test
 public void testAssertThat_node_has_children_succeeds_when_children_are_present()
     throws Exception {
   final Node root = new DefaultNode(String.class);
   final Node child = new DefaultNode(root, mock(Accessor.class), String.class);
   root.addChild(child);
   assertThat(root).node().hasChildren();
 }