MCPcopy Index your code
hub / github.com/koding/kite / TestKiteString

Function TestKiteString

protocol/protocol_test.go:17–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15)
16
17func TestKiteString(t *testing.T) {
18 s := k.String()
19
20 if err := k.Validate(); err != nil {
21 t.Error(err)
22 }
23
24 d, err := KiteFromString(s)
25 if err != nil {
26 t.Error(err)
27 }
28
29 if err := d.Validate(); err != nil {
30 t.Error(err)
31 }
32
33 expect := func(expecting, got string) {
34 if expecting != got {
35 t.Errorf("expecting: '%s', got: '%s'", expecting, got)
36 }
37 }
38
39 expect(d.Name, "name")
40 expect(d.Username, "username")
41 expect(d.ID, "id")
42 expect(d.Environment, "environment")
43 expect(d.Region, "region")
44 expect(d.Version, "version")
45 expect(d.Hostname, "hostname")
46}
47
48func TestKiteQuery(t *testing.T) {
49 q := k.Query()

Callers

nothing calls this directly

Calls 4

KiteFromStringFunction · 0.85
ErrorMethod · 0.65
StringMethod · 0.45
ValidateMethod · 0.45

Tested by

no test coverage detected