| 1 |
package com.fasterxml.jackson.jr.stree; |
| 2 |
|
| 3 |
import com.fasterxml.jackson.jr.ob.JSON; |
| 4 |
|
| 5 |
/** |
| 6 |
* Trivial tests for wiring; not particularly useful as STree instances are immutable |
| 7 |
* so while Array/Object nodes may be created, they will be empty and can not |
| 8 |
* really be changed. |
| 9 |
*/ |
| 10 |
public class CreateNodesTest extends JacksonJrTreeTestBase |
| 11 |
{ |
| 12 |
private final JSON treeJSON = jsonWithTreeCodec(); |
| 13 |
|
| 14 |
public void testCreateArrayNode() throws Exception |
| 15 |
{ |
| 16 |
JrsArray node = treeJSON.createArrayNode(); |
| 17 |
assertNotNull(node); |
| 18 |
assertEquals(0, node.size()); |
| 19 |
} |
| 20 |
|
| 21 |
public void testCreateObjectNode() throws Exception |
| 22 |
{ |
| 23 |
JrsObject node = treeJSON.createObjectNode(); |
| 24 |
assertNotNull(node); |
| 25 |
assertEquals(0, node.size()); |
| 26 |
} |
| 27 |
} |