মূল বিষয়বস্তুতে যান
kitlocal.dev

Write JUnit 5 tests for a Java class

Generates a focused JUnit 5 test class (with Mockito when needed) for one class, covering the happy path, edge cases and failure modes, and explains what it did not cover.

এই রিসোর্স শুধু ইংরেজিতে পাওয়া যায়।

প্রম্পট হলো এমন টেক্সট যা আপনি নিজের অ্যাসিস্ট্যান্টে কপি করেন। KitLocal সেগুলো চালায় না।

ভ্যারিয়েবল পূরণ করুন

আপনি যা লেখেন তা এই ব্রাউজারেই থাকে। এটি URL-এ যোগ হয় না, সেভ হয় না এবং কোথাও পাঠানো হয় না।

প্রিভিউ

এখনও দরকার: Class under test

Write a JUnit 5 test class for the Java class below.

Assertion style: AssertJ
Use Mockito for collaborators: yes

Rules:
- One behavior per test; name tests as should_<behavior>_when_<condition>.
- Cover the happy path, boundary values, null/empty input, and each exception path.
- Do not test private methods directly and do not assert on implementation details.
- Prefer small inline fixtures over shared mutable state.
- After the code, list behaviors you deliberately did NOT test and why.

Collaborators:


Class under test:
```java
{{classUnderTest}}
```

উদ্দেশ্য

Draft a first, reviewable test class so you start from a solid skeleton instead of a blank file.

কখন ব্যবহার করবেন

  • A class has little or no coverage and you need a starting point.
  • You want edge cases you might not think of listed explicitly.

কী প্রস্তুত রাখবেন

  • The class under test and the signatures of its direct collaborators.
  • Your assertion library preference.

প্রত্যাশিত আউটপুট

A single compilable Java test class in one code block, followed by a short "Not covered" list.

এই ক্যাটালগ সম্পর্কে

অন্তর্ভুক্ত স্ন্যাপশট · ১৫ নভে, ২০২৬, ৬:০৫ AM সময়ে প্রকাশিত · ক্যাটালগ রিভিশন 5bc079fe355af2214bc0

অ্যাপের সঙ্গে আসা স্ন্যাপশট দেখানো হচ্ছে (কোনো কনটেন্ট উৎস কনফিগার করা নেই)। উৎসে নতুন কনটেন্ট থাকতে পারে।