cajon-plugin/src/test/resources/inspections/StringIsEmpty/StringIsEmptyAfter.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

26 lines
861 B
Java

import static org.assertj.core.api.Assertions.assertThat;
public class StringIsEmpty {
private void stringIsEmpty() {
String string = "string";
StringBuilder stringBuilder = new StringBuilder();
assertThat(string).isEqualTo("foo");
assertThat(string).as("foo").isEmpty();
assertThat(string).as("bar").isEmpty();
assertThat(stringBuilder).isEqualTo("foo");
assertThat(stringBuilder).as("foo").isEmpty();
assertThat(stringBuilder).as("bar").isEmpty();
assertThat(new Object()).isEqualTo("");
assertThat(string).as("foo").isEqualTo("").as("bar").hasSize(0).hasSameSizeAs("foo").isEmpty();
assertThat(string).as("foo").isEqualTo("").as("bar").hasSize(0).hasSameSizeAs("foo").isEmpty();
org.junit.Assert.assertThat(foo, null);
fail("oh no!");
}
}