connell-class / revassess

this is a trial repo for making a template for the revature assessment
2 stars 11 forks source link

Tier 3 Test 1 asserts single result but returns List #17

Closed theo-gherman closed 4 years ago

theo-gherman commented 4 years ago

Describe the bug Tier 3 Test 1 asserts single result but returns List java.lang.AssertionError: expected:<10> but was:org.hibernate.query.internal.NativeQueryImpl@67ab1c47

To Reproduce Steps to reproduce the behavior:

  1. Go to RevassessTier3\src\test\java\com\tier3\answers\Answer1Tests.java
  2. Run as Junit Test

Possible solution Replace RevassessTier3\src\test\java\com\tier3\answers\Answer1Tests.java Line 25 assertEquals(10,sess.createNativeQuery("select from abs(-10)", Integer.class)); with assertEquals(10,sess.createNativeQuery("select from abs(-10)").getSingleResult());

connellrobert commented 4 years ago

fixed