(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestNodeAddChild(t *testing.T) { |
| 22 | parent := NewNodeBase() |
| 23 | child := &NodeBase{} |
| 24 | parent.AddChild(child) |
| 25 | child.SetName("child1") |
| 26 | assert.Equal(t, 1, len(parent.Children)) |
| 27 | assert.Equal(t, parent, child.Parent) |
| 28 | assert.Equal(t, "/node-base/child1", child.Path()) |
| 29 | } |
| 30 | |
| 31 | func TestNodeEmbedAddChild(t *testing.T) { |
| 32 | parent := testdata.NewNodeEmbed() |
nothing calls this directly
no test coverage detected