Skip to main content

Questions tagged [junit]

JUnit is a unit testing framework for the Java language.

4 votes
1 answer
295 views

I recently started learning Java and decided to create a project to practice. I developed a console-based tic-tac-toe game. I also wrote tests for some of the classes, not because they were necessary, ...
Libo's user avatar
  • 75
3 votes
3 answers
191 views

I have a simple class for representing IPv4-addresses via int values, and a simple IP-address filter that works like a set of IPv4-addresses. ...
coderodde's user avatar
  • 32.3k
2 votes
1 answer
607 views

I am going to run a session for a few other developers who are new to Junit, mocking, etc. I have designed a very simple application with classes and tests to demonstrate how to do unit testing. ...
HariHaravelan's user avatar
1 vote
1 answer
132 views

I have written a code of Binary Search tree that extends comparable and implements an interface. The code for leaves and the helper method countLeaves, makes sure that all of the test goes through ...
user17024023's user avatar
2 votes
1 answer
429 views

I have written a hashtable that implements a set interface. With JUNIT all my test goes through, however I am unsure if they are written correctly based on what their description is. Down here I have ...
ee ss's user avatar
  • 21
5 votes
2 answers
591 views

The assignment problem is about assigning tasks to workers, where each pair (worker, task) has a cost. The Hungarian algorithm builds an optimal solution for this problem. It has two variants, ...
Anab's user avatar
  • 385
3 votes
1 answer
1k views

I have several Dao classes, including a UserDao, below. The DAOs have many methods, but I'm focussing on deleteUser: ...
DozezQuest's user avatar
0 votes
2 answers
1k views

I am writng a JUnit test case for the below methods : ...
user3254725's user avatar
4 votes
2 answers
314 views

I am testing a Spring boot service using JUnit 5 and Mockito. I haven't spent much time on unit testing in the past so I'm not sure if I'm accidentally implementing an anti-pattern or not following ...
user2094257's user avatar
3 votes
0 answers
218 views

I wrote a Java Spring Boot application with MongoDB that on every application start loads customer, account type and transaction details from CSV files to MongoDB. It has one end point that returns ...
user232946's user avatar
3 votes
2 answers
814 views

I have a "Palindrome" class that has some functions for verifying if certain things are Palindromes. For the verification, I have 2 different algorithms, one being recursive and the other ...
George R's user avatar
  • 231
4 votes
1 answer
782 views

Am using Java 1.8 and JUnit 5 to test a program which I wrote which grabs external zip files from a public url and then converts them into MD5 based hashes. This post / question serves as not only a ...
PacificNW_Lover's user avatar
3 votes
2 answers
522 views

As you can see here, I wrote the methods public static int romanToArabic(String number) and ...
user avatar
5 votes
3 answers
3k views

I am trying to practice OOP and TDD concepts, I have written this code for Mars rover challenge from marsrovertechchallenge . Can you please review my code from my GitHub repository? Or you can ...
Sara Elmenshawy's user avatar
13 votes
5 answers
2k views

Recently, a company has asked me to make an implementation of a doubly linked list with unity tests to test my skills. In the task description they specified that the solution should be as academic as ...
Raider's user avatar
  • 233

15 30 50 per page
1
2 3 4 5 6