Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Marcin Grzejszczak
@marcingrzejszczak
yeah you can drag and drop
you can also paste them
you can use markdown
Ashish Meshram
@ashishjmeshram
Oh Okay
Marcin Grzejszczak
@marcingrzejszczak
GenericDAOImpl too please
Ashish Meshram
@ashishjmeshram
Here you go !
Marcin Grzejszczak
@marcingrzejszczak
ok thx
Ashish Meshram
@ashishjmeshram
I really appreciate you trying to help me out here
Marcin Grzejszczak
@marcingrzejszczak
np - give me a sec - I'll write a test
Ashish Meshram
@ashishjmeshram
sure
Marcin Grzejszczak
@marcingrzejszczak
what's this
make(a(UserMaker.User));
it's just some builder for User ?
Ashish Meshram
@ashishjmeshram
yep
It just creates a default user.
Marcin Grzejszczak
@marcingrzejszczak
ok I've reproduced it
Ashish Meshram
@ashishjmeshram
Okay
any idea on what is the issue here ?
Marcin Grzejszczak
@marcingrzejszczak
yeah actually I do
you're mixing unit and integration tests
you want my lib to construct a new instance of an interface
interface don't have constructors
so I can't just initialize it
if you change the UserService to UserServiceImpl it should work
Ashish Meshram
@ashishjmeshram
ohh
Ohh yes Now it worked
But is that ok
?
Marcin Grzejszczak
@marcingrzejszczak
yes
Ashish Meshram
@ashishjmeshram
I mean this way ?
Marcin Grzejszczak
@marcingrzejszczak
beacuse my lib is for unit testing
Ashish Meshram
@ashishjmeshram
@Subject
UserServiceImpl userService
Marcin Grzejszczak
@marcingrzejszczak
I can't autowire your field - I'm not using Spring
Ashish Meshram
@ashishjmeshram
I am doing unit testing only
which is why I want to mock them
Marcin Grzejszczak
@marcingrzejszczak
so you're unit testing an implementation not the inteface
but this is a Subject
your system under test
Ashish Meshram
@ashishjmeshram
Ohh
Marcin Grzejszczak
@marcingrzejszczak
:)
Ashish Meshram
@ashishjmeshram
yeah you are right
:)
Ashish Meshram
@ashishjmeshram
cool
thanks.