it.ozimov.cirneco.hamcrest.base.IsSame Maven / Gradle / Ivy
package it.ozimov.cirneco.hamcrest.base;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
/**
* Is the object the same instance as another?
*
*
* With respect to the class {@linkplain org.hamcrest.core.IsSame}, this versions can compare objects of two
* different classes. So, you can assert as follows:
*
* Integer integer = 10;
* Number number = integer;
*
* assertThat(number, sameInstance(integer));
*
*
* This is in general very useful with any interface and one of its actual implementations.
*
* @since version 0.1 for JDK7
*/
public class IsSame extends BaseMatcher
© 2015 - 2025 Weber Informatics LLC | Privacy Policy