dev-java/assertj-core: add 3.10.0

Higher versions need JUnit 5 to compile.
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Volkmar W. Pogatzki 2022-06-23 11:40:00 +02:00 committed by Florian Schmaus
parent 7942506896
commit 1ccebaf11b
No known key found for this signature in database
GPG Key ID: 2239A7E8F5852052
4 changed files with 567 additions and 1 deletions

View File

@ -1 +1,2 @@
DIST assertj-core-2.3.0.tar.gz 611609 BLAKE2B b99a01f67da75bad18e08df739c10943012f75eda9855ed906d407e474eeafe9a30be2e761de0bc791d72a6ff8c7ec8181cd37c6b6c9126f073df82a974163c3 SHA512 da67930d45afde12d317579edb62b5cff546283ea6a252c9b297f21b74404d7cfb63372d339f51733322205b89d35734e97888085387fb1a83c80d5963b05fd3
DIST assertj-core-3.10.0.tar.gz 1100495 BLAKE2B 4050060e027588d9c62abd5f4c6b77affd96d94a6474c4acc750a946cd3906787f9b2194627abff6d2e0849d590f5a74bbc702b41de6cbfaa09fae951a1012cf SHA512 3763768c5572e133de69735b01fd64432c4330723aa7e6cc0de42e5948cb2d455ae52d9ada66391fb41e47c261816fe12a00d07962e253f0da13ef49255fc5c6

View File

@ -0,0 +1,109 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Skeleton command:
# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/assertj/assertj-core/archive/assertj-core-3.10.0.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild assertj-core-3.10.0.ebuild
EAPI=8
JAVA_PKG_IUSE="doc source test"
MAVEN_ID="org.assertj:assertj-core:3.10.0"
JAVA_TESTING_FRAMEWORKS="junit-4"
inherit java-pkg-2 java-pkg-simple
DESCRIPTION="Rich and fluent assertions for testing for Java"
HOMEPAGE="https://assertj.github.io/doc/"
SRC_URI="https://github.com/assertj/${PN}/archive/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="3"
KEYWORDS="~amd64"
CP_DEPEND="
>=dev-java/byte-buddy-1.12.12:0
"
DEPEND="
>=virtual/jdk-1.8:*
${CP_DEPEND}
dev-java/hamcrest-core:1.3
dev-java/junit:4
dev-java/opentest4j:0
test? (
dev-java/guava:0
dev-java/junit-dataprovider:0
dev-java/memoryfilesystem:0
dev-java/mockito:4
)
"
RDEPEND="
>=virtual/jre-1.8:*
${CP_DEPEND}"
DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md )
PATCHES=( "${FILESDIR}"/assertj-core-3.10.0-java11-compatibility.patch )
S="${WORKDIR}/${PN}-${P}"
JAVA_CLASSPATH_EXTRA="junit-4,hamcrest-core-1.3,opentest4j"
JAVA_SRC_DIR="src/main/java"
JAVA_TEST_GENTOO_CLASSPATH="guava,junit-dataprovider,memoryfilesystem,mockito-4"
JAVA_TEST_SRC_DIR="src/test/java"
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
# These test classes are not run by "mvn test"
# FAILURES!!!
# Tests run: 11514, Failures: 32
# Exclusion should leave "OK (11486 tests)" with jdk-11
# and 14 test failures with jdk-17
JAVA_TEST_EXCLUDES=(
org.assertj.core.internal.BaseArraysTest
org.assertj.core.internal.TestDescription
org.assertj.core.navigation.BaseNavigableIterableAssert_Test
org.assertj.core.navigation.BaseNavigableListAssert_Test
org.assertj.core.navigation.GenericNavigableAssert_Test
org.assertj.core.api.assumptions.BaseAssumptionsRunnerTest
org.assertj.core.api.atomic.referencearray.AtomicReferenceArrayAssert_filtered_baseTest
org.assertj.core.api.iterable.IterableAssert_filtered_baseTest
org.assertj.core.api.objectarray.ObjectArrayAssert_filtered_baseTest
org.assertj.core.api.TestCondition
org.assertj.core.api.BaseAssertionsTest
org.assertj.core.util.Files_TestCase
org.assertj.core.test.EqualsHashCodeContractTestCase
org.assertj.core.test.TestClassWithRandomId
org.assertj.core.test.TestData
org.assertj.core.test.TestFailures
)
src_prepare() {
default
sed \
-e 's:verifyZeroInteractions:verifyNoInteractions:' \
-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_DoubleStream_Test.java \
-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_IntStream_Test.java \
-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_Iterator_Test.java \
-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_LongStream_Test.java \
-i src/test/java/org/assertj/core/api/Assertions_assertThat_with_Stream_Test.java \
-i src/test/java/org/assertj/core/matcher/AssertionMatcher_matches_Test.java || die
}
src_test() {
local vm_version="$(java-config -g PROVIDES_VERSION)"
if ver_test "${vm_version}" -ge 17; then
JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.io=ALL-UNNAMED )
JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED )
JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.math=ALL-UNNAMED )
JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.util=ALL-UNNAMED )
# Before further test_excluds it should now read "Tests run: 11486, Failures: 3"
# Additional exclusions will leave "OK (11476 tests)"
JAVA_TEST_EXCLUDES+=(
org.assertj.core.internal.classes.Classes_assertHasMethods_Test
org.assertj.core.util.xml.XmlStringPrettyFormatter_prettyFormat_Test
)
fi
java-pkg-simple_src_test
}

View File

@ -0,0 +1,456 @@
From 2e107db2a40c5ef60d4f5370e1e71fa780b67599 Mon Sep 17 00:00:00 2001
From: Erhard Pointl <epeee@users.noreply.github.com>
Date: Wed, 23 May 2018 11:45:35 +0200
Subject: [PATCH] java11 compatibility (#1243)
Fix java11 ea compile errors by adding assertThat method for StringBuilder and StringBuffer to disambiguate method resolution as StringBuilder and StringBuffer implements Comparable in java 11
---
.../java/org/assertj/core/api/Assertions.java | 23 ++++++++++++
.../core/api/AssertionsForClassTypes.java | 24 +++++++++++++
.../org/assertj/core/api/Assumptions.java | 25 +++++++++++++
.../org/assertj/core/api/BDDAssertions.java | 24 +++++++++++++
.../api/Java6AbstractBDDSoftAssertions.java | 24 +++++++++++++
.../Java6AbstractStandardSoftAssertions.java | 24 +++++++++++++
.../org/assertj/core/api/Java6Assertions.java | 24 +++++++++++++
.../assertj/core/api/Java6BDDAssertions.java | 24 +++++++++++++
.../org/assertj/core/api/WithAssertions.java | 24 +++++++++++++
.../org/assertj/core/api/WithAssumptions.java | 23 ++++++++++++
...ons_assertThat_with_StringBuffer_Test.java | 36 +++++++++++++++++++
...ns_assertThat_with_StringBuilder_Test.java | 36 +++++++++++++++++++
12 files changed, 311 insertions(+)
create mode 100644 src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java
create mode 100644 src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java
diff --git a/src/main/java/org/assertj/core/api/Assertions.java b/src/main/java/org/assertj/core/api/Assertions.java
index 28c457f4c7..664748dad3 100644
--- a/src/main/java/org/assertj/core/api/Assertions.java
+++ b/src/main/java/org/assertj/core/api/Assertions.java
@@ -2565,6 +2565,29 @@ public static <T> T assertThat(final AssertProvider<T> component) {
return AssertionsForInterfaceTypes.assertThat(actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) {
+ return AssertionsForClassTypes.assertThat(actual);
+ }
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuffer actual) {
+ return AssertionsForClassTypes.assertThat(actual);
+ }
+
/**
* Creates a new instance of <code>{@link CharSequenceAssert}from a {@link String}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java b/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java
index fd05593159..fb2e2acfbd 100644
--- a/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java
+++ b/src/main/java/org/assertj/core/api/AssertionsForClassTypes.java
@@ -487,6 +487,30 @@ public static AbstractShortArrayAssert<?> assertThat(short[] actual) {
return new ShortArrayAssert(actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) {
+ return new CharSequenceAssert(actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuffer actual) {
+ return new CharSequenceAssert(actual);
+ }
+
/**
* Creates a new instance of <code>{@link StringAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/Assumptions.java b/src/main/java/org/assertj/core/api/Assumptions.java
index 9ce773bd44..d26b2453ce 100644
--- a/src/main/java/org/assertj/core/api/Assumptions.java
+++ b/src/main/java/org/assertj/core/api/Assumptions.java
@@ -308,6 +308,31 @@ public static AbstractCharArrayAssert<?> assumeThat(char[] actual) {
return asAssumption(CharSequenceAssert.class, CharSequence.class, actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assumption for assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(StringBuilder actual) {
+ return asAssumption(CharSequenceAssert.class, CharSequence.class, actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assumption for assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(StringBuffer actual) {
+ return asAssumption(CharSequenceAssert.class, CharSequence.class, actual);
+ }
+
+
/**
* Creates a new instance of <code>{@link ShortAssert}</code> assumption.
*
diff --git a/src/main/java/org/assertj/core/api/BDDAssertions.java b/src/main/java/org/assertj/core/api/BDDAssertions.java
index c558153faf..03e574a8d2 100644
--- a/src/main/java/org/assertj/core/api/BDDAssertions.java
+++ b/src/main/java/org/assertj/core/api/BDDAssertions.java
@@ -800,6 +800,30 @@ public static AbstractShortArrayAssert<?> then(short[] actual) {
return assertThat(actual);
}
+ /**
+ * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuilder actual) {
+ return assertThat(actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuffer actual) {
+ return assertThat(actual);
+ }
+
/**
* Creates a new instance of <code>{@link org.assertj.core.api.StringAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java b/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java
index bd54285ae1..edb0451067 100644
--- a/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java
+++ b/src/main/java/org/assertj/core/api/Java6AbstractBDDSoftAssertions.java
@@ -487,6 +487,30 @@ public CharSequenceAssert then(CharSequence actual) {
return proxy(CharSequenceAssert.class, CharSequence.class, actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public CharSequenceAssert then(StringBuilder actual) {
+ return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public CharSequenceAssert then(StringBuffer actual) {
+ return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+ }
+
/**
* Creates a new instance of <code>{@link StringAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java b/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java
index ee9d3fb72d..4ff4315635 100644
--- a/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java
+++ b/src/main/java/org/assertj/core/api/Java6AbstractStandardSoftAssertions.java
@@ -489,6 +489,30 @@ public CharSequenceAssert assertThat(CharSequence actual) {
return proxy(CharSequenceAssert.class, CharSequence.class, actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public CharSequenceAssert assertThat(StringBuilder actual) {
+ return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public CharSequenceAssert assertThat(StringBuffer actual) {
+ return proxy(CharSequenceAssert.class, CharSequence.class, actual);
+ }
+
/**
* Creates a new instance of <code>{@link StringAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/Java6Assertions.java b/src/main/java/org/assertj/core/api/Java6Assertions.java
index e88ccde3c8..10912f41bc 100644
--- a/src/main/java/org/assertj/core/api/Java6Assertions.java
+++ b/src/main/java/org/assertj/core/api/Java6Assertions.java
@@ -924,6 +924,30 @@ public static AbstractShortArrayAssert<?> assertThat(short[] actual) {
return new CharSequenceAssert(actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) {
+ return new CharSequenceAssert(actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuffer actual) {
+ return new CharSequenceAssert(actual);
+ }
+
/**
* Creates a new instance of <code>{@link StringAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/Java6BDDAssertions.java b/src/main/java/org/assertj/core/api/Java6BDDAssertions.java
index 4ffc23475b..009929ebc9 100644
--- a/src/main/java/org/assertj/core/api/Java6BDDAssertions.java
+++ b/src/main/java/org/assertj/core/api/Java6BDDAssertions.java
@@ -795,6 +795,30 @@ public static AbstractShortArrayAssert<?> then(short[] actual) {
return assertThat(actual);
}
+ /**
+ * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuilder actual) {
+ return assertThat(actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link org.assertj.core.api.CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ public static AbstractCharSequenceAssert<?, ? extends CharSequence> then(StringBuffer actual) {
+ return assertThat(actual);
+ }
+
/**
* Creates a new instance of <code>{@link org.assertj.core.api.StringAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/WithAssertions.java b/src/main/java/org/assertj/core/api/WithAssertions.java
index c87854dd89..b71250c1bd 100644
--- a/src/main/java/org/assertj/core/api/WithAssertions.java
+++ b/src/main/java/org/assertj/core/api/WithAssertions.java
@@ -564,6 +564,30 @@ default <VALUE> AtomicStampedReferenceAssert<VALUE> assertThat(AtomicStampedRefe
return Assertions.assertThat(actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ default AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(final StringBuilder actual) {
+ return Assertions.assertThat(actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ default AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(final StringBuffer actual) {
+ return Assertions.assertThat(actual);
+ }
+
/**
* Creates a new instance of <code>{@link ShortArrayAssert}</code>.
*
diff --git a/src/main/java/org/assertj/core/api/WithAssumptions.java b/src/main/java/org/assertj/core/api/WithAssumptions.java
index 0703fa33dd..56539e36dd 100644
--- a/src/main/java/org/assertj/core/api/WithAssumptions.java
+++ b/src/main/java/org/assertj/core/api/WithAssumptions.java
@@ -371,6 +371,29 @@ default <VALUE> AtomicStampedReferenceAssert<VALUE> assumeThat(AtomicStampedRefe
return Assumptions.assumeThat(actual);
}
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuilder}.
+ *
+ * @param actual the actual value.
+ * @return the created assumption for assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ default AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(final StringBuilder actual) {
+ return Assumptions.assumeThat(actual);
+ }
+
+ /**
+ * Creates a new instance of <code>{@link CharSequenceAssert}</code> assumption from a {@link StringBuffer}.
+ *
+ * @param actual the actual value.
+ * @return the created assumption for assertion object.
+ * @since 3.11.0
+ */
+ @CheckReturnValue
+ default AbstractCharSequenceAssert<?, ? extends CharSequence> assumeThat(final StringBuffer actual) {
+ return Assumptions.assumeThat(actual);
+ }
/**
* Creates a new instance of <code>{@link ShortArrayAssert}</code> assumption.
*
diff --git a/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java
new file mode 100644
index 0000000000..b3f020f101
--- /dev/null
+++ b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuffer_Test.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2012-2018 the original author or authors.
+ */
+package org.assertj.core.api;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests for <code>{@link Assertions#assertThat(StringBuffer)}</code>.
+ */
+public class Assertions_assertThat_with_StringBuffer_Test {
+
+ @Test
+ public void should_create_Assert() {
+ AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(new StringBuffer("Yoda"));
+ assertThat(assertions).isNotNull();
+ }
+
+ @Test
+ public void should_pass_actual() {
+ StringBuffer actual = new StringBuffer("Yoda");
+ AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(actual);
+ assertThat(assertions.actual).isSameAs(actual);
+ }
+}
diff --git a/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java
new file mode 100644
index 0000000000..315d6d4b9f
--- /dev/null
+++ b/src/test/java/org/assertj/core/api/Assertions_assertThat_with_StringBuilder_Test.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * Copyright 2012-2018 the original author or authors.
+ */
+package org.assertj.core.api;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests for <code>{@link Assertions#assertThat(StringBuilder)}</code>.
+ */
+public class Assertions_assertThat_with_StringBuilder_Test {
+
+ @Test
+ public void should_create_Assert() {
+ AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(new StringBuilder("Yoda"));
+ assertThat(assertions).isNotNull();
+ }
+
+ @Test
+ public void should_pass_actual() {
+ StringBuilder actual = new StringBuilder("Yoda");
+ AbstractCharSequenceAssert<?, ?> assertions = Assertions.assertThat(actual);
+ assertThat(assertions.actual).isSameAs(actual);
+ }
+}

View File

@ -7,6 +7,6 @@
</maintainer>
<longdescription>AssertJ core is a Java library that provides a fluent interface for writing assertions. Its main goal is to improve test code readability and make maintenance of tests easier. AssertJ core provides assertions for JDK standard types can be used with either JUnit or TestNG.</longdescription>
<upstream>
<remote-id type="github">joel-costigliola/assertj-core</remote-id>
<remote-id type="github">assertj/assertj-core</remote-id>
</upstream>
</pkgmetadata>