Skip to content

Commit

Permalink
add test classes for actors and routes
Browse files Browse the repository at this point in the history
  • Loading branch information
fluency03 committed Apr 16, 2018
1 parent 60da29d commit 43729c2
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 5 deletions.
9 changes: 5 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ val scalaMockVersion = "4.1.0"
val httpDependencies = Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"de.heikoseeberger" %% "akka-http-json4s" % akkaJson4sVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test
"de.heikoseeberger" %% "akka-http-json4s" % akkaJson4sVersion
)

val testDependencies = Seq(
"org.scalactic" %% "scalactic" % scalaTestVersion,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test,
"org.scalamock" %% "scalamock" % scalaMockVersion % Test
"org.scalamock" %% "scalamock" % scalaMockVersion % Test,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test
)

libraryDependencies ++= {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/fluency03/blockchain/core/Block.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ object Block {
ZERO64,
"Welcome to Blockchain in Scala!",
List(Transaction(ZERO64, ZERO64, 50, genesisTimestamp)),
genesisTimestamp,
genesisTimestamp,
difficulty)

def mineNextBlock(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.fluency03.blockchain.api.actors

class BlockActorTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.fluency03.blockchain.api.actors

class BlockchainActorTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.fluency03.blockchain.api.actors

class TransactionActorTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.fluency03.blockchain.api.routes

class BlockRoutesTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.fluency03.blockchain.api.routes

class BlockchainRoutesTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.fluency03.blockchain.api.routes

class TransactionRoutesTest {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.fluency03.blockchain.api.utils

import com.fluency03.blockchain.api.utils.GenericMessage.Response
import org.scalatest.{FlatSpec, Matchers}

class GenericMessageTest extends FlatSpec with Matchers {

"A Response" should "contain " in {
Response("Response test.").message shouldEqual "Response test."
}

}

0 comments on commit 43729c2

Please sign in to comment.