Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Posts by klutt
This question most often comes up in relation to C++. That language has something that is called reference in the standard. They work like pointers, with a few differences. They have to be initi...
I managed to do it with lambda. Something like this: Set<U> ulist = new LinkedHashSet<>(); @Test void test() { doAnswer(i -> { U arg = i.getArgument(0); ...
Assume I have this class Foo class Foo { private int x; void setX(int x) { this.x = x; } } And I have a Junit test like this: Bar bar; @BeforeEach void setu...
Let's say I have this class I want to mock class A { public void add(T arg) { B b = A.getB(); U val = somefunc(arg); V ret = b.add(val); } } I have a spy o...
- ← Previous
- 1
- 2
- Next →