All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evasion.framework.test.EqualsTester Maven / Gradle / Ivy

There is a newer version: 2.0.0.2
Show newest version
/*
 * Document confidentiel - Diffusion interdite 
 */
package com.evasion.framework.test;

import org.junit.Assert;

/**
 * Tester de Equals � base de instanceof.
 * 
 * Cette impl�mentation teste les equals impl�ment�s avec une comparaison avec
 * le instanceof.
*
* par ex:
* * public bollean equals(Object obj) {
* if (this == obj) {
* return true;
* }
*
* if (!(ojb instanceof MyClass) {
* return false;
* }
* ....
* } *
*/ public class EqualsTester extends AbstractEqualsTester { /** * {@inheritDoc} */ @Override protected void assertEqualsSubClass(final Object a, final Object d) { Assert.assertTrue( "a.equals(d) returned false, equals() is using getClass() comparison ?", a.equals(d)); Assert.assertTrue( "d.equals(a) returned false, equals() is using getClass() comparison ?", d.equals(a)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy