Fixed broken code in test classes (missing imports, undefined variables).
This commit is contained in:
parent
b84a781134
commit
5048c898ec
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class BinaryExpression {
|
||||
|
||||
@ -196,7 +197,7 @@ public class BinaryExpression {
|
||||
|
||||
assertThat(numberObjAct.equals(numberObjExp)).as("doh!").isTrue().isEqualTo(true);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(stringAct, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class BinaryExpression {
|
||||
|
||||
@ -196,7 +197,7 @@ public class BinaryExpression {
|
||||
|
||||
assertThat(numberObjAct.equals(numberObjExp)).as("doh!").isTrue().isEqualTo(true);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(stringAct, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class BooleanCondition {
|
||||
|
||||
@ -32,7 +33,7 @@ public class BooleanCondition {
|
||||
assertThat(primitive).isTrue().as("foo").isTrue().as("bar").isTrue().isFalse();
|
||||
|
||||
assertThat(object).isEqualTo(Boolean.TYPE);
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(object, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class BooleanCondition {
|
||||
|
||||
@ -32,7 +33,7 @@ public class BooleanCondition {
|
||||
assertThat(primitive).isEqualTo(Boolean.TRUE).as("foo").isEqualTo(true).as("bar").isTrue().isFalse();
|
||||
|
||||
assertThat(object).isEqualTo(Boolean.TYPE);
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(object, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -41,7 +42,7 @@ public class CollectionMapExpression {
|
||||
assertThat(stringList.isEmpty()).as("foo").isEqualTo(false).as("bar").isTrue();
|
||||
assertThat(stringList.isEmpty()).as("foo").satisfies(it -> it.booleanValue()).as("bar").isFalse();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(stringList, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -41,7 +42,7 @@ public class CollectionMapExpression {
|
||||
assertThat(stringList.isEmpty()).as("foo").isEqualTo(false).as("bar").isTrue();
|
||||
assertThat(stringList.isEmpty()).as("foo").satisfies(it -> it.booleanValue()).as("bar").isFalse();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(stringList, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class EnumerableIsEmpty {
|
||||
|
||||
@ -17,7 +18,7 @@ public class EnumerableIsEmpty {
|
||||
|
||||
assertThat("string").as("foo").hasSize(0).hasSameSizeAs("foo").isEmpty();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat("foo", null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class EnumerableIsEmpty {
|
||||
|
||||
@ -17,7 +18,7 @@ public class EnumerableIsEmpty {
|
||||
|
||||
assertThat("string").as("foo").hasSize(0).hasSameSizeAs("foo").hasSize(0);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat("foo", null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.assertj.guava.api.Assertions.assertThat;
|
||||
|
||||
public class GuavaOptional {
|
||||
@ -59,7 +60,7 @@ public class GuavaOptional {
|
||||
|
||||
assertThat(opt.orNull()).as("foo").isEqualTo(null).isNotNull();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(opt, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.assertj.guava.api.Assertions.assertThat;
|
||||
|
||||
public class GuavaOptional {
|
||||
@ -59,7 +60,7 @@ public class GuavaOptional {
|
||||
|
||||
assertThat(opt.orNull()).as("foo").isEqualTo(null).isNotNull();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(opt, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.assertj.guava.api.Assertions.assertThat;
|
||||
|
||||
public class ImplicitAssertion {
|
||||
@ -285,7 +286,7 @@ public class ImplicitAssertion {
|
||||
assertThat(guavaOptional).extractingValue().isEqualTo("foo");
|
||||
assertThat(guavaOptional).extractingCharSequence().isEqualTo("foo");
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.assertj.guava.api.Assertions.assertThat;
|
||||
|
||||
public class ImplicitAssertion {
|
||||
@ -285,7 +286,7 @@ public class ImplicitAssertion {
|
||||
assertThat(guavaOptional).isPresent().extractingValue().isEqualTo("foo");
|
||||
assertThat(guavaOptional).isPresent().extractingCharSequence().isEqualTo("foo");
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class InstanceOf {
|
||||
|
||||
@ -22,7 +23,7 @@ public class InstanceOf {
|
||||
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);
|
||||
org.junit.Assert.assertThat(object, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class InstanceOf {
|
||||
|
||||
@ -22,7 +23,7 @@ public class InstanceOf {
|
||||
assertThat(object instanceof Boolean).as("foo").isEqualTo(Boolean.TRUE).as("bar").isEqualTo(true);
|
||||
assertThat(object instanceof Boolean).as("foo").isEqualTo(Boolean.TRUE).as("bar").isEqualTo(false);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(object, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class InvertedBooleanCondition {
|
||||
|
||||
@ -36,7 +37,7 @@ public class InvertedBooleanCondition {
|
||||
assertThat(primitive).as("foo").isFalse().as("bar").isFalse();
|
||||
assertThat(primitive).as("foo").isFalse().as("bar").isTrue();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(object, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class InvertedBooleanCondition {
|
||||
|
||||
@ -36,7 +37,7 @@ public class InvertedBooleanCondition {
|
||||
assertThat(!primitive).as("foo").isEqualTo(Boolean.TRUE).as("bar").isNotEqualTo(false);
|
||||
assertThat(!primitive).as("foo").isEqualTo(Boolean.TRUE).as("bar").isNotEqualTo(true);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(object, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class Java8Optional {
|
||||
|
||||
@ -46,7 +47,7 @@ public class Java8Optional {
|
||||
|
||||
assertThat(opt.orElse(null)).as("foo").isEqualTo(null).isNotNull();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(opt, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class Java8Optional {
|
||||
|
||||
@ -46,7 +47,7 @@ public class Java8Optional {
|
||||
|
||||
assertThat(opt.orElse(null)).as("foo").isEqualTo(null).isNotNull();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(opt, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class JoinStatements {
|
||||
assertThat(list.get(--i)).isEqualTo("foo");
|
||||
assertThat(list.get(--i)).isEqualTo("foo");
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(list, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class JoinStatements {
|
||||
assertThat(list.get(--i)).isEqualTo("foo");
|
||||
assertThat(list.get(--i)).isEqualTo("foo");
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(list, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class ObjectExpression {
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class ObjectExpression {
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class ObjectIsNull {
|
||||
|
||||
@ -14,7 +15,7 @@ public class ObjectIsNull {
|
||||
assertThat(new Object()).as("foo").isNotNull().as("bar").isEqualTo(new Object()).as("etc").isNull();
|
||||
assertThat(new Object()).as("foo").isEqualTo(null).as("bar").isEqualTo(new Object()).as("etc").isNotNull();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat("foo", null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class ObjectIsNull {
|
||||
|
||||
@ -14,7 +15,7 @@ public class ObjectIsNull {
|
||||
assertThat(new Object()).as("foo").isNotEqualTo(null).as("bar").isEqualTo(new Object()).as("etc").isEqualTo(null);
|
||||
assertThat(new Object()).as("foo").isEqualTo(null).as("bar").isEqualTo(new Object()).as("etc").isNotEqualTo(null);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat("foo", null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class Size {
|
||||
|
||||
@ -104,7 +105,7 @@ public class Size {
|
||||
assertThat(foo).isEqualTo(0);
|
||||
assertThat(string.length()).isPositive();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class Size {
|
||||
|
||||
@ -104,7 +105,7 @@ public class Size {
|
||||
assertThat(foo).isEqualTo(0);
|
||||
assertThat(string.length()).isPositive();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class StringExpression {
|
||||
|
||||
@ -50,7 +51,7 @@ public class StringExpression {
|
||||
assertThat(string.endsWith("foo")).as("foo").isEqualTo(false).as("bar").isTrue();
|
||||
assertThat(string.endsWith("foo")).as("foo").satisfies(it -> it.booleanValue()).as("bar").isFalse();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class StringExpression {
|
||||
|
||||
@ -50,7 +51,7 @@ public class StringExpression {
|
||||
assertThat(string.endsWith("foo")).as("foo").isEqualTo(false).as("bar").isTrue();
|
||||
assertThat(string.endsWith("foo")).as("foo").satisfies(it -> it.booleanValue()).as("bar").isFalse();
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class StringIsEmpty {
|
||||
|
||||
@ -19,7 +20,7 @@ public class StringIsEmpty {
|
||||
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);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
public class StringIsEmpty {
|
||||
|
||||
@ -19,7 +20,7 @@ public class StringIsEmpty {
|
||||
assertThat(string).as("foo").isEqualTo("").as("bar").hasSize(0).hasSameSizeAs("foo").isEqualTo("");
|
||||
assertThat(string).as("foo").isEqualTo("").as("bar").hasSize(0).hasSameSizeAs("foo").hasSize(0);
|
||||
|
||||
org.junit.Assert.assertThat(foo, null);
|
||||
org.junit.Assert.assertThat(string, null);
|
||||
fail("oh no!");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user