-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstring_test.go
More file actions
executable file
·39 lines (32 loc) · 973 Bytes
/
Copy pathstring_test.go
File metadata and controls
executable file
·39 lines (32 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package gopherneo
import (
"testing"
)
func TestStringJoining(t *testing.T) {
// join a string as a path
joined := joinPath([]string{"resources", "123"})
if joined != "resources/123" {
t.Error("joined result was: %v", joined)
}
// join a string
joined = join([]string{"keanu", " ", "reeves"})
if joined != "keanu reeves" {
t.Error("joined result was: %v", joined)
}
// join with a delimiter
joined = joinUsing([]string{"this", "that"}, "#")
if joined != "this#that" {
t.Error("joined result was: %v", joined)
}
}
// func TestCypherGeneration(t *testing.T) {
// // create cypher node from parameters
// props := make(map[string]interface{})
// props["car"] = "My Car"
// props["bar"] = 3
// //props["jar"] = 45.0 // TODO support floats
// cypherizedNode := propsToCypherString("Thing", props, "t")
// if cypherizedNode != "(t:Thing { car: 'My Car', bar: 3 })" {
// t.Error("cypherized node is inaccurate: %v\n", cypherizedNode)
// }
// }