Skip to content

Commit

Permalink
#57 Fixed testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Apr 19, 2024
1 parent 9f61e42 commit 3ce95c4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
25 changes: 25 additions & 0 deletions explainer/explainer_error_examples_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package explainer_test

import (
"context"

"github.com/senzing-garage/explain/explainer"
)

// ----------------------------------------------------------------------------
// Examples for godoc documentation
// ----------------------------------------------------------------------------

func ExampleExplainerError() {
// For more information, visit https://github.com/senzing-garage/explain/blob/main/explainer/explainer_error_test.go
ctx := context.TODO()
explainer := &explainer.ExplainerError{
ErrorId: "senzing-60010000",
TtyOnly: true,
}
err := explainer.Explain(ctx)
if err != nil {
panic(err)
}
// Output: For information on that error, visit https://hub.senzing.com/sz-sdk-go-core/errors#senzing-60010000
}
25 changes: 25 additions & 0 deletions explainer/explainer_null_examples_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package explainer_test

import (
"context"

"github.com/senzing-garage/explain/explainer"
)

// ----------------------------------------------------------------------------
// Examples for godoc documentation
// ----------------------------------------------------------------------------

func ExampleExplainerNull() {
// For more information, visit https://github.com/senzing-garage/explain/blob/main/explainer/explainer_error_test.go
ctx := context.TODO()
explainer := &explainer.ExplainerError{
ErrorId: "senzing-60010000",
TtyOnly: true,
}
err := explainer.Explain(ctx)
if err != nil {
panic(err)
}
// Output: For information on that error, visit https://hub.senzing.com/sz-sdk-go-core/errors#senzing-60010000
}

0 comments on commit 3ce95c4

Please sign in to comment.