name := "cakepattern"
version := "0.1"
scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
"org.scalamock" %% "scalamock-core" % "3.1.1" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.1.1" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.0" % "test",
"org.mockito" % "mockito-all" % "1.10.19"
)
을 다음과 내가 SBT의 테스트를 할 때
package services
import config.MockAuthServiceComponent
import dto.{Tweet, User}
import org.scalamock.scalatest.MockFactory
import org.scalatest.{FlatSpec, OneInstancePerTest, Outcome}
import org.scalatest.matchers.MatchResult
import services.impl.DefaultTweetServiceComponent
class DefaultTweetServiceComponentTest extends FlatSpec with MockFactory with OneInstancePerTest{
val tweetServiceComponent = new DefaultTweetServiceComponent with MockAuthServiceComponent {
override val tweetService = DefaultTweetService
}
}
를 다음과 같이 내 scalatest 클래스는 보이는 내 build.sbt 파일을 찾습니다 : 내가 얻을 컴파일 다음과 같은 오류
Error:scalac: missing or invalid dependency detected while loading class file 'AbstractMockFactory.class'.
Could not access type NoArgTest in trait org.scalatest.Suite,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
A full rebuild may help if 'AbstractMockFactory.class' was compiled against an incompatible version of org.scalatest.Suite.
MockFactory를 가져올 때 오류가 사라지는 것 같습니다. 제발 도와주세요, 내가 뭘 놓치고 있니?
감사합니다.