Originally posted by Itapaj� Takeguma:
What if you have to call those methods statically (just because the client wants that way, and that's that!)?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
Can you please elaborate on why you can't wrap the static methods?
Originally posted by Ernest Friedman-Hill:
He can't mock them directly because they're static, but for some reason, the client insists that they be static and be called statically.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Itapaj� Takeguma:
That's why I started to think about deceiving class A at a much lower level: loding a faked class... but I don't know if it is possible, given that class B is in the class path!
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Itapaj� Takeguma:
I really can't change signature and I can't change implementation. If I asked the client (the one who is paying for the system (the sponsor), not client in the sense of the one who is using the class (the caller)), he will just say: "hey, I architectured this way. If you don't like it, I'll find one who will" (but in portuguese).
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Itapaj� Takeguma:
When I run the JUnit's swingui I had some problems, I think it is possible that JUnit is overriding my class loader in some way.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |