Introduce Stream - experimental API for low-level access to VPP API
[govpp.git] / api / errors_test.go
diff --git a/api/errors_test.go b/api/errors_test.go
new file mode 100644 (file)
index 0000000..78e1fbf
--- /dev/null
@@ -0,0 +1,23 @@
+package api
+
+import (
+       "testing"
+
+       . "github.com/onsi/gomega"
+)
+
+func TestUnspecified(t *testing.T) {
+       RegisterTestingT(t)
+
+       var err error = VPPApiError(-1)
+       errstr := err.Error()
+       Expect(errstr).Should(BeEquivalentTo("VPPApiError: Unspecified Error (-1)"))
+}
+
+func TestUnknown(t *testing.T) {
+       RegisterTestingT(t)
+
+       var err error = VPPApiError(-999)
+       errstr := err.Error()
+       Expect(errstr).Should(BeEquivalentTo("VPPApiError: -999"))
+}