[
https://issues.apache.org/jira/browse/SUREFIRE-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961800#comment-15961800
]
Tibor Digana commented on SUREFIRE-1328:
----------------------------------------
[~Sywor]
I do not understand your problem.
What's wrong in this log?:
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ surefireBug ---
Downloading:
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.19.1/surefire-junit4-2.19.1.pom
Downloaded:
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.19.1/surefire-junit4-2.19.1.pom
(0 B at 0.0 KB/sec)
Downloading:
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.19.1/surefire-junit4-2.19.1.jar
Downloaded:
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.19.1/surefire-junit4-2.19.1.jar
(0 B at 0.0 KB/sec)
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestUseCustomCollection
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.534 sec <<<
FAILURE! - in TestUseCustomCollection
testThatActualFails(TestUseCustomCollection) Time elapsed: 0.004 sec <<<
ERROR!
java.lang.ClassCastException: Item cannot be cast to WrongInterface
at
TestUseCustomCollection.testThatActualFails(TestUseCustomCollection.java:48)
Results :
Tests in error:
TestUseCustomCollection.testThatActualFails:48 ClassCast Item cannot be cast
t...
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
> Test should throw ClassCastException but doesn't
> ------------------------------------------------
>
> Key: SUREFIRE-1328
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1328
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.x support, Maven Surefire Plugin
> Affects Versions: 2.19.1
> Environment: Windows and Linux (Ubuntu 14.04); Java 1.8.0 111 and 112
> x64; junit 4.12; mockito 2.6.8; assertj 3.6.2
> Reporter: Ossian Petri
> Attachments: surefireBug.zip
>
>
> When using argument captor together with assertThat::isInstanceOf in the
> example code that is provided an ClassCastException is expected. This
> behavior can be seen when running the test from command line and as well from
> Intellij which uses surefire plugin. However this code behaves predictably in
> Eclipse since it has its own test executor.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)