junit - Play scala unit test with JUnitRunner and Specification -
im running test on play framework scala.
have scala class tests, go this:
@runwith(classof[junitrunner]) class updateproducttest extends specification { abstract class withdbdata extends withapplication { } "product db repository" should { //this test #1 ! "add product minimal fields" in new withdbdata { val name = some(localizeditem(idgenerator.newid, "testname")) val description = some(localizeditem(idgenerator.newid, "testdescription")) val product = new product(option(idgenerator.newid), "defaulttestname", "defaulttestdescription", some(1), none, none, none, none, new references(some("1"), some("1"), some("1"), some("1")), none, none, name,description, none) val productrepository = new productdbrepositoryimpl() productrepository.addproduct("en_us", "1", product) } } "product db repository" should // <= wish run test , ignore test above!! { val image1:productimage = new productimage(java.util.uuid.randomuuid().tostring, some("high resultion"), some("url image 1"), some(1)) val image2:productimage = new productimage(java.util.uuid.randomuuid().tostring, some("low resolution"), some("url image 2"), some(1)) //this test #2 ! "add product minimal fields , images" in new withdbdata { ..... }
my problem tests start should run, i want run test #2 in class - how do ??
thanks!
Comments
Post a Comment