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

com.evasion.framework.test.StrictEqualsTester 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 Strict.
 * 
 * Cette impl�mentation teste les equals impl�ment�s avec une comparaison sur
 * les classes. par ex: 
* * public bollean equals(Object obj) {
* if (this == obj) {
* return true;
* }
*
* if (this.getClass() != obj .getClass() {
* * return false;
* }
* ....
* } *
*/ public class StrictEqualsTester extends AbstractEqualsTester { /** * {@inheritDoc} */ protected void assertEqualsSubClass(final Object a, final Object d) { Assert.assertFalse( "a.equals(d) returned true, equals() is using 'instanceof' ?", a.equals(d)); Assert.assertFalse( "d.equals(a) returned true, equals() is using 'instanceof' ?", d.equals(a)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy