Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 7. Views > Testing

7.6. Testing

Now that the Favorites view has been modified, the JUnit tests for the Favorites view need to be updated to take the modifications into account. If the tests are run as they stand, you’ll get the following failure.

testView(com.qualityeclipse.favorites.test.FavoritesViewTest)

java.lang.AssertionError: array lengths differed, expected.length=3
actual.length=0
  at org.junit.Assert.fail(Assert.java:71)
  at org.junit.Assert.internalArrayEquals(Assert.java:293)
  at org.junit.Assert.assertArrayEquals(Assert.java:129)
  at org.junit.Assert.assertArrayEquals(Assert.java:140)
  at com.qualityeclipse.favorites.test.
           FavoritesViewTest.testView(FavoritesViewTest.java:63)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
... etc ...


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial