How to test if class objects are equal using FEST assertThat(...)
method?
Example:
import static org.fest.assertions.api.Assertions.assertThat;
@Test
public void test() throws Exception {
assertThat(findClass()).isEqualTo(Integer.class);
}
private Class<?> findClass() {
// logic for finding a class object
return String.class;
}
The above does not compile. The isEqualTo
method complains. Is there some other method I should use to test equality between class objects?