score:1
Accepted answer
this is indeed a bug in eclipse. you can raise as such if you like. http://www.assembla.com/spaces/scala-ide/tickets.
when you extend testcase the test is being run because it starts with test, not because of the annotation. there was a problem with recognition of annotations, which is how the junit stuff works, and i haven't looked to see if it is fixed yet to make the junit stuff work.
your best bet is to:
- raise the bug against scala-ide
- add @runwith[classof[junit]) to your class
the following works:
trait bartesting {
@test final def testbar() {
println("hello world")
}
}
@runwith(classof[junit4])
class footesting extends bartesting {
}
and i'll try and fix the bug.
edit: in the latest versions of scala-ide (as of 9 november 2011), this now works.
Source: stackoverflow.com
Related Query
- @Test method in Scala trait not found
- reduceByKey method not being found in Scala Spark
- Scala IDE Error: Main method not found in class 'hello'
- Scala extend trait field not found
- Test Class Not Found when Unit Testing on Scala
- getOrElse method not being found in Scala Spark
- method <init>()V not found in chisel test
- Error in running Scala Program: Main method not found in class main, please define the main method
- Scala trait extending abstract class, how do I know whether an abstract method has been implemented or not
- Spark Scala Error - Error: Main method not found in class
- Difference between using App trait and main method in scala
- scala slick method I can not understand so far
- IntelliJ Bug: Scala 145, Error:scalac: Scala compiler JARs not found
- Scala Compiler not found in Intellij IDEA 11 with Play 2.0 project
- Calling a method on the superclass in a self-typed trait in scala
- After installing Scala using MacPorts, scala command is not found
- Composing trait behavior in Scala in an Akka receive method
- Best practice to implement Scala trait which supports method chaining
- object scala in compiler mirror not found - running Scala compiler programmatically
- Cannot specialize a Scala method with specializable trait as return type
- Scala println not working with App trait
- reduceByKey method not being found in IntelliJ
- In Scala static value initialization does not appear to be happening before the main method is called
- Order of method call in Scala trait mixin
- Error running scala console. Module not found
- Scala - override a class method in a trait
- Scala value not found
- Implicit Messages Provider instance was not found in Play framework with scala
- Scala deserialization: class not found
- Scala is not inferring the appropriate method
More Query from same tag
- Scheduling a Spark Job from a NodeJS or Play! Server
- java.lang.NumberFormatException caused by Spark JDBC reading table header
- WireMock error while trying to mock an HttpClient with Proxy
- iterating through while loop in scala
- Run a scala project using Jupyter Notebook
- covariant type T occurs in invariant position
- Scala: Add to list not adding to list
- Extracting number after specific string in Spark dataframe column - Scala
- object Plugin is not a member of package sbtassembly
- Type aliasing type constraints in generics
- scala for loop strange
- How to use mesos master url in a self-contained Scala Spark program
- How to traverse list of nested maps in scala
- Scala - Passing a function to Future.apply
- Scala Slick. Wrong pagination \w Postgres
- Only need to process specific columns in my Spark DataFrame
- Converting Gradle/IDEA project into multiple subprojects
- Flink write to S3 on EMR
- Spark scala selecting multiple columns from a list and single columns
- Scala 2.8 tools for production use
- Transform structure of Spark DF. Create one column or row for each value in a column. Impute values
- Spark Json Iteration
- How to combine results into stream from multiple sources
- Type mismatch, expected: T, actual: T
- How to create variables in typed actors?
- Why akka.jsr166y.ForkJoinPool is deprecated in Akka 2.0.2?
- Using type parameter in anonymous class in Scala
- Scala indexOf accepts everything
- Choosing the last element of a list
- Play 2.1 JSON to Scala object