cajon-plugin/src/test/resources/inspections/InstanceOf/InstanceOfAfter.java
chrisly42 095345a456 The JoinAssertThatStatements inspection will now add line breaks on joining statements.
Unrelated: Upgraded Gradle to 5.4.1. Upgraded kotlin to 1.3.40. Upgraded jacoco to 0.8.4. Minor style change for immediate returns. Increased test/branch coverage.
2019-06-23 18:51:12 +02:00

29 lines
1.1 KiB
Java

import static org.assertj.core.api.Assertions.assertThat;
public class InstanceOf {
private void instanceOf() {
Boolean object = Boolean.TRUE;
assertThat(object).as("foo").isInstanceOf(Boolean.class);
assertThat(object).isInstanceOf(Boolean.class);
assertThat(object).isInstanceOf(Boolean.class);
assertThat(object).isInstanceOf(Boolean.class);
assertThat(object).isInstanceOf(Boolean.class);
assertThat(object).as("foo").isNotInstanceOf(Boolean.class);
assertThat(object).isNotInstanceOf(Boolean.class);
assertThat(object).isNotInstanceOf(Boolean.class);
assertThat(object).isNotInstanceOf(Boolean.class);
assertThat(object).isNotInstanceOf(Boolean.class);
assertThat(object).as("nah").isNotInstanceOf(Boolean.class);
assertThat(object).as("foo").isInstanceOf(Boolean.class).as("bar").isInstanceOf(Boolean.class);
assertThat(object instanceof Boolean).as("foo").isEqualTo(Boolean.TRUE).as("bar").isEqualTo(false);
org.junit.Assert.assertThat(foo, null);
fail("oh no!");
}
}