Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@anatolyra
Created May 11, 2017 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anatolyra/d85b13035f768656f97b36f0df81c0e4 to your computer and use it in GitHub Desktop.
Save anatolyra/d85b13035f768656f97b36f0df81c0e4 to your computer and use it in GitHub Desktop.
class MyTestClass extends SpecificationWithJUnit with TestClassDataContext {
"My service" should {
"set the owner of the car" >> { testData: DefaultObjects =>
val service = new Service
service.setCarOwner(carId = testData.car.id, ownerId = testData.person.id)
service.getPerson(testData.person.id).carId shouldEqual Some(testData.car.id)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment