The Artima Developer Community
Sponsored Link

ScalaTest/ScalaUtils Forum
Getting Started w/JUnit4 & ScalaTest uses JUnit 3 notation

1 reply on 1 page. Most recent reply: Aug 10, 2010 1:18 AM by Bill Venners

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Al Scherer

Posts: 3
Nickname: ascherer
Registered: Nov, 2009

Getting Started w/JUnit4 & ScalaTest uses JUnit 3 notation Posted: Nov 6, 2009 3:08 PM
Reply to this message Reply
Advertisement
Hi,

A question about the "Getting Started with JUnit 4 and ScalaTest" guide (at http://www.scalatest.org/getting_started_with_junit_4/).

While the guide shows the improved conciseness of verifyFun as compared to verifyEasy, I noticed that verifyEasy uses the older, JUnit 3 approach to testing expected exceptions (i.e., by using a try-catch with an explicit fail statement) rather than the JUnit 4 approach (using the "@Test(expected=<ExcepionClassName>.class" annotation).

Does the JUnit4 annotation approach work in ScalaTest?

Thanks,
Al


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Getting Started w/JUnit4 & ScalaTest uses JUnit 3 notation Posted: Aug 10, 2010 1:18 AM
Reply to this message Reply
Yes, the JUnit 4 annotation approach also works.

Flat View: This topic has 1 reply on 1 page
Topic: Strange characters in output Previous Topic   Next Topic Topic: EasyMockSugar does not work with EasyMock3

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use