diff --git a/build.sbt b/build.sbt index 7a2039a..bb8de00 100644 --- a/build.sbt +++ b/build.sbt @@ -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 ++= { diff --git a/src/main/scala/com/fluency03/blockchain/core/Block.scala b/src/main/scala/com/fluency03/blockchain/core/Block.scala index 7ca5f60..8f3fcaf 100644 --- a/src/main/scala/com/fluency03/blockchain/core/Block.scala +++ b/src/main/scala/com/fluency03/blockchain/core/Block.scala @@ -69,7 +69,7 @@ object Block { ZERO64, "Welcome to Blockchain in Scala!", List(Transaction(ZERO64, ZERO64, 50, genesisTimestamp)), - genesisTimestamp, + genesisTimestamp, difficulty) def mineNextBlock( diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/BlockActorTest.scala b/src/test/scala/com/fluency03/blockchain/api/actors/BlockActorTest.scala new file mode 100644 index 0000000..5fc6ebd --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/actors/BlockActorTest.scala @@ -0,0 +1,5 @@ +package com.fluency03.blockchain.api.actors + +class BlockActorTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/BlockchainActorTest.scala b/src/test/scala/com/fluency03/blockchain/api/actors/BlockchainActorTest.scala new file mode 100644 index 0000000..c9e1279 --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/actors/BlockchainActorTest.scala @@ -0,0 +1,5 @@ +package com.fluency03.blockchain.api.actors + +class BlockchainActorTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/actors/TransactionActorTest.scala b/src/test/scala/com/fluency03/blockchain/api/actors/TransactionActorTest.scala new file mode 100644 index 0000000..d94c914 --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/actors/TransactionActorTest.scala @@ -0,0 +1,5 @@ +package com.fluency03.blockchain.api.actors + +class TransactionActorTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/BlockRoutesTest.scala b/src/test/scala/com/fluency03/blockchain/api/routes/BlockRoutesTest.scala new file mode 100644 index 0000000..1496b08 --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/routes/BlockRoutesTest.scala @@ -0,0 +1,5 @@ +package com.fluency03.blockchain.api.routes + +class BlockRoutesTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala b/src/test/scala/com/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala new file mode 100644 index 0000000..e4e2a6f --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/routes/BlockchainRoutesTest.scala @@ -0,0 +1,5 @@ +package com.fluency03.blockchain.api.routes + +class BlockchainRoutesTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/routes/TransactionRoutesTest.scala b/src/test/scala/com/fluency03/blockchain/api/routes/TransactionRoutesTest.scala new file mode 100644 index 0000000..fdaa75d --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/routes/TransactionRoutesTest.scala @@ -0,0 +1,5 @@ +package com.fluency03.blockchain.api.routes + +class TransactionRoutesTest { + +} diff --git a/src/test/scala/com/fluency03/blockchain/api/utils/GenericMessageTest.scala b/src/test/scala/com/fluency03/blockchain/api/utils/GenericMessageTest.scala new file mode 100644 index 0000000..7d96e84 --- /dev/null +++ b/src/test/scala/com/fluency03/blockchain/api/utils/GenericMessageTest.scala @@ -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." + } + +}