I am very new to scala so trying to understand how funsuite testing works. I have a bunch of tests that take a method data() to set it as a particular method from a variety of methods namely method1(): Long, method2(): Long etc
I figured defining the method1/2/... etc within the class would be fine and then sequentially go through them for my tests rather than having to write duplicate tests for each method, but seems like the data cannot be found by the tests. I also tried putting both the tests inside the for loop but then I am having issues with the IDE not being able to find tests. What am I doing wrong?
Example
class controlTest extends Anyfunsuite {
protected def method1(): Long = { a() }
protected def method2(): Long = { b() }
protected def method3(): Long = { c() }
for(i <- Seq(method1(), method2(), method3()) {
def data(): Long = i
}
test("testing1"){
data()
....
}
test("testing2"){
data()
...
}