mirror of https://github.com/stretchr/testify.git
objx transition complete
parent
5f6413d60a
commit
855b03c899
|
@ -2,7 +2,7 @@ package mock
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/stretchr/stew/objects"
|
||||
"github.com/stretchr/objx"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"reflect"
|
||||
"runtime"
|
||||
|
@ -50,15 +50,15 @@ type Mock struct {
|
|||
|
||||
// TestData holds any data that might be useful for testing. Testify ignores
|
||||
// this data completely allowing you to do whatever you like with it.
|
||||
testData objects.Map
|
||||
testData objx.Map
|
||||
}
|
||||
|
||||
// TestData holds any data that might be useful for testing. Testify ignores
|
||||
// this data completely allowing you to do whatever you like with it.
|
||||
func (m *Mock) TestData() objects.Map {
|
||||
func (m *Mock) TestData() objx.Map {
|
||||
|
||||
if m.testData == nil {
|
||||
m.testData = make(objects.Map)
|
||||
m.testData = make(objx.Map)
|
||||
}
|
||||
|
||||
return m.testData
|
||||
|
|
|
@ -40,7 +40,7 @@ func Test_Mock_TestData(t *testing.T) {
|
|||
if assert.NotNil(t, mockedService.TestData()) {
|
||||
|
||||
mockedService.TestData().Set("something", 123)
|
||||
assert.Equal(t, 123, mockedService.TestData().Get("something"))
|
||||
assert.Equal(t, 123, mockedService.TestData().Get("something").Data())
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue