Skip to content

This repository is to test the hashCode(), equals() and compareTo() in JAVA objects.

Notifications You must be signed in to change notification settings

shwetado/object-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Object method tests

This repository is to test the hashCode(), equals() and compareTo() in JAVA objects.

Test cases for Equals
* With literals and `new String()` constructor 
* with same and different values
* With all combinations

EqualsAndHashCodeTest.java file contains above test cases.

Create test cases for Equals of Person
* With correct and wrong equals and hash code implementation
* With different data structure `HashMap`,`Set` and `ArrayList`

PersonTest.java file contains above test cases.

Write test for different comparators for persons
* name
* name length
* age
* reverse

PersonTest.java file contains above test cases.

Write test cases for
* ArrayList with different types 
* Do it with extends also.

PersonTest.java file contains above test cases.

About

This repository is to test the hashCode(), equals() and compareTo() in JAVA objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages