From a11edcf6a70a610e7a08a1f28da5c77c4bda1519 Mon Sep 17 00:00:00 2001 From: Dick Wall Date: Fri, 10 Jul 2015 10:01:37 -0500 Subject: [PATCH] Remove JUnit dependency and references. --- build.sbt | 43 +++---------------- project/plugins.sbt | 8 ++-- .../inject/ConstructorInjectionTest.scala | 3 -- .../subcut/inject/FrozenModuleTest.scala | 3 -- .../subcut/inject/ImplicitBindingTest.scala | 3 -- .../inject/InjectConfigValuesTest.scala | 3 -- .../subcut/inject/InstanceProviderTest.scala | 3 -- .../inject/MergedModulesLateBindingTest.scala | 3 -- .../ModuleCompositionAndMergingTest.scala | 3 -- .../PlainScalaInjectInBindingTest.scala | 3 -- .../subcut/inject/PushBindingsTest.scala | 3 -- .../subcut/inject/TrialBindingModule.scala | 10 ++--- .../subcut/inject/TypeErasureTest.scala | 3 -- 13 files changed, 12 insertions(+), 79 deletions(-) diff --git a/build.sbt b/build.sbt index 249df06..032fb43 100644 --- a/build.sbt +++ b/build.sbt @@ -2,55 +2,24 @@ name := "subcut" organization := "com.escalatesoft.subcut" -version := "2.1" +version := "2.1.1-SNAPSHOT" -crossScalaVersions := Seq("2.11.0", "2.10.4") +crossScalaVersions := Seq("2.11.7", "2.10.5") -scalaVersion := "2.11.0" +scalaVersion := "2.11.7" scalacOptions += "-deprecation" -libraryDependencies += "junit" % "junit" % "4.5" % "test" - -libraryDependencies += "org.scalatest" %% "scalatest" % "2.1.4" % "test" +libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.4" % "test" libraryDependencies <<= (scalaVersion, libraryDependencies) { (ver, deps) => deps :+ "org.scala-lang" % "scala-compiler" % ver } -publishMavenStyle := true - -publishTo <<= version { (v: String) => - val nexus = "https://oss.sonatype.org/" - if (v.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") -} +publishMavenStyle := false publishArtifact in Test := false credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") -pomIncludeRepository := { _ => false } - -pomExtra := ( - http://github.com/dickwall/subcut - - - Apache 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html - repo - - - - git@github.com:dickwall/subcut.git - scm:git:git@github.com:dickwall/subcut.git - - - - dickwall - Dick Wall - http://about.me/dickwall - - ) +licenses += ("Apache-2.0", url("http://www.apache.org/license/LICENSE-2.0.html")) diff --git a/project/plugins.sbt b/project/plugins.sbt index e772882..b0d9fc7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,5 @@ -resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" +addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.0") -addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2") +resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven" -resolvers += Classpaths.typesafeResolver - -addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0") +addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") diff --git a/src/test/scala/com/escalatesoft/subcut/inject/ConstructorInjectionTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/ConstructorInjectionTest.scala index e357730..543c2f3 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/ConstructorInjectionTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/ConstructorInjectionTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{SeveredStackTraces, FunSuite} -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner import java.beans.BeanInfo /** @@ -13,7 +11,6 @@ import java.beans.BeanInfo * Time: 6:38 AM */ -@RunWith(classOf[JUnitRunner]) class ConstructorInjectionTest extends FunSuite with Matchers with SeveredStackTraces { test("Use defined binding, supply no constructor parameter") { implicit val bindings = AnimalModule diff --git a/src/test/scala/com/escalatesoft/subcut/inject/FrozenModuleTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/FrozenModuleTest.scala index efe5c61..09209be 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/FrozenModuleTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/FrozenModuleTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{FunSuite, SeveredStackTraces} -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner /* * Created by IntelliJ IDEA. @@ -12,7 +10,6 @@ import org.scalatest.junit.JUnitRunner * Time: 2:50 PM */ -@RunWith(classOf[JUnitRunner]) class FrozenModuleTest extends FunSuite with Matchers with SeveredStackTraces { test("No binding in the module") { intercept[BindingException] { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/ImplicitBindingTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/ImplicitBindingTest.scala index 0299201..66eda12 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/ImplicitBindingTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/ImplicitBindingTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{SeveredStackTraces, FunSuite} -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner import NewBindingModule._ /** @@ -13,7 +11,6 @@ import NewBindingModule._ * Time: 6:28 PM */ -@RunWith(classOf[JUnitRunner]) class ImplicitBindingTest extends FunSuite with Matchers with SeveredStackTraces { test("Implicit binding 1") { implicit val bm = newBindingModule { implicit module => diff --git a/src/test/scala/com/escalatesoft/subcut/inject/InjectConfigValuesTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/InjectConfigValuesTest.scala index c3ce48a..1c0f2f7 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/InjectConfigValuesTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/InjectConfigValuesTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{FunSuite, SeveredStackTraces} -import org.scalatest.junit.JUnitRunner -import org.junit.runner.RunWith /** * Created by IntelliJ IDEA. @@ -12,7 +10,6 @@ import org.junit.runner.RunWith * Time: 10:32 AM */ -@RunWith(classOf[JUnitRunner]) class InjectConfigValuesTest extends FunSuite with Matchers with SeveredStackTraces { test("inject some default configuration values using all bound") { implicit val bindings = ConfigValueModule diff --git a/src/test/scala/com/escalatesoft/subcut/inject/InstanceProviderTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/InstanceProviderTest.scala index 01bd6e6..c034cfe 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/InstanceProviderTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/InstanceProviderTest.scala @@ -2,10 +2,7 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{FunSuite, SeveredStackTraces} -import org.scalatest.junit.JUnitRunner -import org.junit.runner.RunWith -@RunWith(classOf[JUnitRunner]) class InstanceProviderTest extends FunSuite with Matchers { test("NewInstanceProvider should provide a new instance each time instance property is accessed") { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/MergedModulesLateBindingTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/MergedModulesLateBindingTest.scala index 86015ed..cf5f2c2 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/MergedModulesLateBindingTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/MergedModulesLateBindingTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.FunSuite import org.scalatest.Matchers -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner /** * Created with IntelliJ IDEA. @@ -13,7 +11,6 @@ import org.scalatest.junit.JUnitRunner * To change this template use File | Settings | File Templates. */ -@RunWith(classOf[JUnitRunner]) class MergedModulesLateBindingTest extends FunSuite with Matchers { test ("provider manufacturing configuration") { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/ModuleCompositionAndMergingTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/ModuleCompositionAndMergingTest.scala index 8786963..c18600c 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/ModuleCompositionAndMergingTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/ModuleCompositionAndMergingTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{FunSuite, SeveredStackTraces} -import org.scalatest.junit.JUnitRunner -import org.junit.runner.RunWith import io.Source /** @@ -13,7 +11,6 @@ import io.Source * Time: 4:46 PM */ -@RunWith(classOf[JUnitRunner]) class ModuleCompositionAndMergingTest extends FunSuite with Matchers with SeveredStackTraces { test("Modules should be composable the :: operator") { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/PlainScalaInjectInBindingTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/PlainScalaInjectInBindingTest.scala index cbf584f..b95b207 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/PlainScalaInjectInBindingTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/PlainScalaInjectInBindingTest.scala @@ -1,10 +1,7 @@ package com.escalatesoft.subcut.inject -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner import org.scalatest.Matchers import org.scalatest.FunSuite -@RunWith(classOf[JUnitRunner]) class PlainScalaInjectInBindingTest extends FunSuite with Matchers { test("inject method is used as service locator for plain Scala constructor style dependency injection during binding") { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/PushBindingsTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/PushBindingsTest.scala index 515e00d..a57ad7c 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/PushBindingsTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/PushBindingsTest.scala @@ -2,8 +2,6 @@ package com.escalatesoft.subcut.inject import org.scalatest.Matchers import org.scalatest.{FunSuite, SeveredStackTraces} -import org.scalatest.junit.JUnitRunner -import org.junit.runner.RunWith /* * Created by IntelliJ IDEA. @@ -22,7 +20,6 @@ class SomeTestClass extends Injectable with PushBindingsTestInjections { } -@RunWith(classOf[JUnitRunner]) class PushBindingsTest extends FunSuite with Matchers with SeveredStackTraces { test("Just using the standard bindings") { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/TrialBindingModule.scala b/src/test/scala/com/escalatesoft/subcut/inject/TrialBindingModule.scala index f689099..d0c7d29 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/TrialBindingModule.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/TrialBindingModule.scala @@ -1,18 +1,14 @@ package com.escalatesoft.subcut.inject +import org.scalatest.{SeveredStackTraces, FunSuite} +import org.scalatest.Matchers + /* * Created by IntelliJ IDEA. * User: Dick Wall * Date: 2/17/11 * Time: 11:41 AM */ - -import org.scalatest.{SeveredStackTraces, FunSuite} -import org.scalatest.Matchers -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner - -@RunWith(classOf[JUnitRunner]) class InjectionTest extends FunSuite with Matchers with SeveredStackTraces { test("Create an object with injected resources") { diff --git a/src/test/scala/com/escalatesoft/subcut/inject/TypeErasureTest.scala b/src/test/scala/com/escalatesoft/subcut/inject/TypeErasureTest.scala index a174e19..6114200 100644 --- a/src/test/scala/com/escalatesoft/subcut/inject/TypeErasureTest.scala +++ b/src/test/scala/com/escalatesoft/subcut/inject/TypeErasureTest.scala @@ -2,11 +2,8 @@ package com.escalatesoft.subcut.inject import org.scalatest.{SeveredStackTraces, FunSuite} import org.scalatest.Matchers -import org.junit.runner.RunWith -import org.scalatest.junit.JUnitRunner import scala.language.reflectiveCalls -@RunWith(classOf[JUnitRunner]) class TypeErasureTest extends FunSuite with Matchers with SeveredStackTraces { test("Can inject types regardless of erasure in binding keys") { val actual = new Injectable {