Skip to content

Instantly share code, notes, and snippets.

@wendigo
Last active April 18, 2024 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wendigo/755544d62136ba7e201ad60d15b27555 to your computer and use it in GitHub Desktop.
Save wendigo/755544d62136ba7e201ad60d15b27555 to your computer and use it in GitHub Desktop.
IntelliJ isEqualTo bug
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AssertProvider;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class SerafinTest
{
@Test
public void testIntelliJBug()
{
assertThat(query("whatever"))
.isEqualTo("whatever");
}
public static AssertProvider<QueryAssert> query(String test)
{
return () -> new QueryAssert(test, QueryAssert.class);
}
public static class QueryAssert
extends AbstractAssert<QueryAssert, String>
{
protected QueryAssert(String o, Class<?> selfType)
{
super(o, selfType);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment