All Questions
79 questions
4
votes
1
answer
281
views
Tic-Tac-Toe Console Game in Java
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, ...
3
votes
3
answers
177
views
IPv4 filter in Java
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.
...
2
votes
1
answer
589
views
Basic Ticket booking code with Unit tests
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. ...
1
vote
1
answer
118
views
Binary Search tree, leaves method [closed]
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 ...
2
votes
1
answer
420
views
HashTable Implementation with JUNIT testing
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 ...
5
votes
2
answers
531
views
Hungarian algorithm for optimal assignment
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, ...
3
votes
1
answer
1k
views
Testing DAO Delete User
I have several Dao classes, including a UserDao, below. The DAOs have many methods, but I'm focussing on deleteUser:
...
0
votes
2
answers
1k
views
Need Feedback on JUnit test comparing two timestamps
I am writng a JUnit test case for the below methods :
...
3
votes
0
answers
211
views
Migrate customer and transaction data from CSV to MongoDB
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 ...
3
votes
2
answers
805
views
Palindrome Algorithm and JUnit 5 Tests
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 ...
4
votes
1
answer
780
views
Proper way to unit test MD5 Hashing of Zip Files from URL using JUnit 5?
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 ...
3
votes
2
answers
516
views
Unit testing Roman-Arabic-Roman numeric converter
As you can see here, I wrote the methods public static int romanToArabic(String number) and ...
5
votes
3
answers
3k
views
Mars Rover technical Challenge in OOP
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 ...
13
votes
5
answers
2k
views
Find most "academic" implementation of doubly linked list
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 ...
3
votes
0
answers
1k
views
Android+Firebase testing using Mockito
I have an interactor/usecase class in my application. My application follows MVVM architecture with interactor/usecases responsible for logic (e.g. get data from api-service, store in local-database ...