Re: [lsug] Re: Running ScalaTest in Eclipse

From: Jim C.
Sent on: Friday, April 27, 2012 8:29 PM
You are a star Andy that worked first time.

Thanks

Jim

On 27 April[masked]:06, Andy Hicks <[address removed]> wrote:
Hi Jim

What I normally do is create a sbt project and import that, but thats a little bit more work, for last wed we did this:

What I did was

1. Add JUnit 4 to the project
- Properties / Java Build Path / Libraries / Add Library    (hope you can follow this)

2 . Add ScalaTest
- download from http://scalatest.org/   and unzip
- Properties / Java Build Path / Libraries / Add External JARs  and add 'scalatest-1.6.1.jar'        (may have diff version)


template for test class

package net.lsug
import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.junit.JUnitRunner
import org.junit.runner.RunWith

@RunWith(classOf[JUnitRunner])
class MainSuite extends FunSuite {
  test("A Test") {
  }
}



Hope this helps, if/when you get stuck or don't understand then give me another shout.
andy

ps: I know I still have to put the code up on github



On 27 April[masked]:41, Jim Collins <[address removed]> wrote:
Hi Andy,

I am trying to run some ScalaTest unit tests in Eclipse without any luck. What did you have to do to run the tests in Eclipse?

You was running the tests at the Dojo without any problems.

Thanks

Jim







--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Andy Hicks ([address removed]) from London Scala Users' Group.
To learn more about Andy Hicks, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

  • Scala Dojo

    Web site for monthly Scala Dojo

  • Scala Jobs

    Google Group of Scala Jobs in the London Area

  • ScalaDays-AMS

    Price is 650 Euro with code “scalaug” for ScalaDays Amsterdam

  • _.underscore

    Scala consultants, trainers, and developers, based in London, UK

  • Springer

    Help and supporters of the monthly dojo

  • Mind Candy

    Help with the Adv Scala Meet-up

  • Skills Matter

    Provide the venue for many of our meetings.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy