mirror of
https://github.com/stretchr/testify.git
synced 2025-09-04 19:35:26 +00:00
Add build tag testify_no_objx to allow to exclude method Mock.TestData() for avoiding dependency on github.com/stretchr/objx.
22 lines
410 B
Go
22 lines
410 B
Go
//go:build !testify_no_objx && !testify_no_deps
|
|
|
|
package mock
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func Test_Mock_TestData(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
var mockedService = new(TestExampleImplementation)
|
|
|
|
if assert.NotNil(t, mockedService.TestData()) {
|
|
|
|
mockedService.TestData().Set("something", 123)
|
|
assert.Equal(t, 123, mockedService.TestData().Get("something").Data())
|
|
}
|
|
}
|