• Post Reply Bookmark Topic Watch Topic
  • New Topic

I am failing the test  RSS feed

 
amir Ghannad
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)

 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you share your test cases as well?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!