question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing `assertThat(SQLException)`

See original GitHub issue

Describe the bug

assertThat(…).isEqualTo(…) is not working with java.sql.SQLException. The compiler says it’s ambiguous.

  • assertj core version: 3.22.0
  • java version: 11.0.13-tem

Test case reproducing the bug

// Compilererror
assertThat(new java.sql.SQLException("test")).isEqualTo(new java.sql.SQLException("test"));

// No Compilererror (but fails)
assertThat((Exception) new SQLException("test")).isEqualTo((Exception) new SQLException("test"));

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rnowifcommented, Aug 27, 2022

Hi,

I’d be interested in working on that issue if that’s still okay.

1reaction
mslowiakcommented, Aug 16, 2022

Sorry, I am not able to deliver that thing. Unassigned. Still open 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception in thread "main" java.sql.SQLException: Missing ...
I have done below sample JDBC program which retrieving user details.Now i am getting surprised that from same callable statement i am getting ......
Read more >
java.sql.SQLException.getCause java code examples - Tabnine
executeUpdate("select CONVERT_FROM('1','INTEGER') from (values(1))"); } catch (SQLException e) { assertThat("Null getCause(); missing expected wrapped ...
Read more >
AssertJ - fluent assertions java library - GitHub Pages
entry point for all assertThat methods and utility methods (e.g. entry) import static org.assertj.core.api.Assertions.
Read more >
Asserting a SqlException in a unit test : r/dotnet - Reddit
... test in MSTest in which I'm trying to assert that a SqlException is ... Asserting a SqlException in a unit test ......
Read more >
Java Examples for org.hamcrest.core.IsEqual - Javatips.net
@Test public void testUpdateRoles() throws SQLException { String role = "testrole"; ... vals.get(numAttrKeyIndex); assertThat("Missing XML attribute value.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found