Wrote merge nodes test and neo4j testing infrastructure.
Added entity formatting functionality. Renamed the EventSubgraph to Subgraph because it is generic.
This commit is contained in:
+6
-2
@@ -5,6 +5,10 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Match Keys
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
func TestSimpleMatchKeys(t *testing.T) {
|
||||
matchKeys := &SimpleMatchKeys{
|
||||
Keys: map[string][]string{
|
||||
@@ -58,13 +62,13 @@ func TestMatchProps(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "matching label, required prop missing",
|
||||
node: NewNode("Event", Properties{}),
|
||||
node: NewNode([]string{"Event"}, Properties{}),
|
||||
wantErr: true,
|
||||
wantErrText: "missing property",
|
||||
},
|
||||
{
|
||||
name: "no recognized label",
|
||||
node: NewNode("Tag", Properties{"name": "e", "value": "abc"}),
|
||||
node: NewNode([]string{"Tag"}, Properties{"name": "e", "value": "abc"}),
|
||||
wantErr: true,
|
||||
wantErrText: "no recognized label",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user