mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 12:37:48 +00:00
added test for nill mock generator item
Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -96,6 +96,18 @@ func TestNewMockGeneratorWithDictionary(t *testing.T) {
|
||||
assert.NotNil(t, mg)
|
||||
}
|
||||
|
||||
func TestMockGenerator_GenerateJSONMock_NoObject(t *testing.T) {
|
||||
|
||||
mg := NewMockGenerator(JSON)
|
||||
|
||||
var isNil any
|
||||
isNil = nil
|
||||
|
||||
mock, err := mg.GenerateMock(isNil, "")
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, mock)
|
||||
}
|
||||
|
||||
func TestMockGenerator_GenerateJSONMock_BadObject(t *testing.T) {
|
||||
type NotMockable struct {
|
||||
pizza string
|
||||
|
||||
Reference in New Issue
Block a user