• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

I am failing the test

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I am sure that my code is right, but I am getting this error when I submit my project through our repository server
any idea?


testBasicConstructorsAndGetters java.lang.AssertionError: expected:<2> but was:<0> at org.junit.Assert.fail(Assert.java:88)... java.lang.AssertionError: expected:<2> but was:<0>

at org.junit.Assert.fail(Assert.java:88)

at org.junit.Assert.failNotEquals(Assert.java:834)

at org.junit.Assert.assertEquals(Assert.java:645)

at org.junit.Assert.assertEquals(Assert.java:631)

at p4Testing.PublicTests.testBasicConstructorsAndGetters(PublicTests.java:33)

testConstructorWithOneParam java.lang.AssertionError: expected:<1> but was:<0> at org.junit.Assert.fail(Assert.java:88)... java.lang.AssertionError: expected:<1> but was:<0>

at org.junit.Assert.fail(Assert.java:88)

at org.junit.Assert.failNotEquals(Assert.java:834)

at org.junit.Assert.assertEquals(Assert.java:645)

at org.junit.Assert.assertEquals(Assert.java:631)

at p4Testing.PublicTests.testConstructorWithOneParam(PublicTests.java:48)

PUBLIC 3 error 5 testCopyConstructor java.lang.AssertionError: expected:<2> but was:<0> at org.junit.Assert.fail(Assert.java:88)... java.lang.AssertionError: expected:<2> but was:<0>

at org.junit.Assert.fail(Assert.java:88)

at org.junit.Assert.failNotEquals(Assert.java:834)

at org.junit.Assert.assertEquals(Assert.java:645)

at org.junit.Assert.assertEquals(Assert.java:631)

at p4Testing.PublicTests.testCopyConstructor(PublicTests.java:72)

 
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you share your test cases as well?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic