Пример #1
0
func TestParameterSerialize(t *testing.T) {
	parameter := model.NewParameter("test", "")

	value := "test"
	expected := "test"
	actual := parameter.Serialize(value)

	if expected != actual {
		t.Fatalf("Failed %s %s", expected, actual)
	}
}
Пример #2
0
func TestParameterParse(t *testing.T) {
	parameter := model.NewParameter("test", "")

	value := "test"
	expected := "test"
	actual, err := parameter.Parse(value)
	if err != nil {
		t.Fatalf("Error returned, expected correct value: %s", err.Error())
	}

	if expected != actual {
		t.Fatalf("Failed %s %s", expected, actual)
	}
}