Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

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‭

29 posts
60%
+1 −0
Q&A Are there references in C?

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...

posted 2y ago by klutt‭  ·  edited 2y ago by klutt‭

Answer
50%
+0 −0
Q&A Mocking methods with arguments

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); ...

posted 2y ago by klutt‭  ·  edited 2y ago by klutt‭

Answer
42%
+1 −2
Q&A How to create an object, call one of it's methods and pass it as an argument as a oneliner?

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...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 2y ago by Alexei‭

Question java junit
37%
+1 −3
Q&A Mocking methods with arguments

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...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 2y ago by klutt‭