Example #1
0
func TestTdataDefault(t *testing.T) {
	Convey("Testing TdataDefault()", t, func() {
		_, err := tdata.Get("default")
		So(err, ShouldNotBeNil)
		So(err, ShouldResemble, fmt.Errorf("Get(default) is unknown!"))
	})
}
Example #2
0
func TestTdataCfg3(t *testing.T) {
	Convey("Testing TdataCfg3()", t, func() {
		act, err := tdata.Get("cfg3")
		So(err, ShouldBeNil)
		So(act, ShouldEqual, cfg3)
	})
}
Example #3
0
func TestTdataFileManifest(t *testing.T) {
	Convey("Testing TdataFileManifest()", t, func() {
		act, err := tdata.Get("fileManifest")
		So(err, ShouldBeNil)
		So(act, ShouldEqual, fileManifest)
	})
}
Example #4
0
func TestTdataCfg(t *testing.T) {
	Convey("Testing TdataCfg()", t, func() {
		exp := map[string]string{
			"cfg":  cfg,
			"cfg2": cfg2,
			"cfg3": cfg3,
		}

		for k := range exp {
			act, err := tdata.Get(k)
			So(err, ShouldBeNil)
			So(act, ShouldEqual, exp[k])
		}
	})
}