Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createInstance does not work with UUID #17

Closed
K0zka opened this issue Mar 13, 2016 · 0 comments
Closed

createInstance does not work with UUID #17

K0zka opened this issue Mar 13, 2016 · 0 comments
Labels
type:bug Behavior not according to spec

Comments

@K0zka
Copy link

K0zka commented Mar 13, 2016

createInstance does not work with UUID, it tries to construct a UUID but the constructor throws an exception.

As a consequence any() and eq() does not work with UUID arguments

example:

val customer = Customer(id = UUID.randumUuid(), name = "Eugene Cuckoo")
whenever(customerDao.get( eq(customer.id) )).thenReturn(customer)
K0zka added a commit to K0zka/mockito-kotlin that referenced this issue Mar 14, 2016
Bug-Url: mockito#17
Signed-off-by: Laszlo Hornyak <[email protected]>
nhaarman added a commit that referenced this issue Mar 14, 2016
The UUID class has a single-argument constructor which
expects an array with some specific contents.
This commit tries to avoid these type of constructors,
since it may be a common case.
Instead, it tries to find a constructor without an array
parameter, or otherwise falls back.

Fixes issue #17.
@nhaarman nhaarman added type:bug Behavior not according to spec accepted done and removed accepted labels Mar 27, 2016
@nhaarman nhaarman removed the done label Mar 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Behavior not according to spec
Projects
None yet
Development

No branches or pull requests

2 participants