Documentation
¶
Overview ¶
Package testutils provides shared utilities for JSON Patch testing.
Index ¶
- func ApplyInternalOp(t *testing.T, doc any, op internal.Operation) any
- func ApplyInternalOpWithError(t *testing.T, doc any, op internal.Operation)
- func ApplyInternalOps(t *testing.T, doc any, ops []internal.Operation) any
- func ApplyInternalOpsWithError(t *testing.T, doc any, ops []internal.Operation)
- func ApplyOperation(t *testing.T, doc any, operation jsonpatch.Operation) any
- func ApplyOperationWithError(t *testing.T, doc any, operation jsonpatch.Operation) error
- func ApplyOperations(t *testing.T, doc any, operations []jsonpatch.Operation) any
- func ApplyOperationsWithError(t *testing.T, doc any, operations []jsonpatch.Operation) error
- func RunMultiOperationTestCase(t *testing.T, tc MultiOperationTestCase)
- func RunMultiOperationTestCases(t *testing.T, testCases []MultiOperationTestCase)
- func RunTestCase(t *testing.T, tc TestCase)
- func RunTestCases(t *testing.T, testCases []TestCase)
- type MultiOperationTestCase
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyInternalOp ¶ added in v0.5.9
ApplyInternalOp applies a single internal.Operation to a document.
func ApplyInternalOpWithError ¶ added in v0.5.9
ApplyInternalOpWithError applies an internal.Operation expecting it to fail.
func ApplyInternalOps ¶ added in v0.5.9
ApplyInternalOps applies multiple internal.Operations to a document.
func ApplyInternalOpsWithError ¶ added in v0.5.9
ApplyInternalOpsWithError applies multiple internal.Operations expecting them to fail.
func ApplyOperation ¶
ApplyOperation applies a single operation to a document.
func ApplyOperationWithError ¶
ApplyOperationWithError applies an operation expecting it to fail.
func ApplyOperations ¶
ApplyOperations applies multiple operations to a document.
func ApplyOperationsWithError ¶
ApplyOperationsWithError applies multiple operations expecting them to fail.
func RunMultiOperationTestCase ¶
func RunMultiOperationTestCase(t *testing.T, tc MultiOperationTestCase)
RunMultiOperationTestCase executes a multi-operation test case.
func RunMultiOperationTestCases ¶
func RunMultiOperationTestCases(t *testing.T, testCases []MultiOperationTestCase)
RunMultiOperationTestCases executes multiple multi-operation test cases.
func RunTestCase ¶
RunTestCase executes a single test case.
func RunTestCases ¶
RunTestCases executes multiple test cases.