From 3b7daafad7311477ae6f7d09d45566a9597fc720 Mon Sep 17 00:00:00 2001 From: str4d <str4d@mail.i2p> Date: Sun, 9 Jun 2013 12:21:35 +0000 Subject: [PATCH] Fill in basic datastructure length tests --- core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala | 6 +++++- core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala | 6 +++++- core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala | 6 +++++- core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala | 6 +++++- core/java/test/scalatest/net/i2p/data/SignatureSpec.scala | 6 +++++- .../test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala | 6 +++++- .../test/scalatest/net/i2p/data/SigningPublicKeySpec.scala | 6 +++++- 7 files changed, 35 insertions(+), 7 deletions(-) diff --git a/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala b/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala index 583c329bed..2804be67d9 100644 --- a/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala +++ b/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class PrivateKeySpec extends FunSpec with ShouldMatchers { + val privateKey = new PrivateKey + describe("A PrivateKey") { - it("should be 256 bytes long") (pending) + it("should be 256 bytes long") { + privateKey should have length (256) + } } } diff --git a/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala b/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala index 5d131a8fd5..b45230bb37 100644 --- a/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala +++ b/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class PublicKeySpec extends FunSpec with ShouldMatchers { + val publicKey = new PublicKey + describe("A PublicKey") { - it("should be 256 bytes long") (pending) + it("should be 256 bytes long") { + publicKey should have length (256) + } } } diff --git a/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala b/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala index 77c62bcf66..7330b59686 100644 --- a/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala +++ b/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class SessionKeySpec extends FunSpec with ShouldMatchers { + val sessionKey = new SessionKey + describe("A SessionKey") { - it("should be 32 bytes long") (pending) + it("should be 32 bytes long") { + sessionKey should have length (32) + } } } diff --git a/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala b/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala index 8a755bfc7e..c845585b94 100644 --- a/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala +++ b/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class SessionTagSpec extends FunSpec with ShouldMatchers { + val sessionTag = new SessionTag + describe("A SessionTag") { - it("should be 32 bytes long") (pending) + it("should be 32 bytes long") { + sessionTag should have length (32) + } } } diff --git a/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala b/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala index ff17c365d7..4476d9f8ac 100644 --- a/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala +++ b/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class SignatureSpec extends FunSpec with ShouldMatchers { + val signature = new Signature + describe("A Signature") { - it("should be 40 bytes long") (pending) + it("should be 40 bytes long") { + signature should have length (40) + } } } diff --git a/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala b/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala index a4ad5ff336..e6e9107ec0 100644 --- a/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala +++ b/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class SigningPrivateKeySpec extends FunSpec with ShouldMatchers { + val signingPrivateKey = new SigningPrivateKey + describe("A SigningPrivateKey") { - it("should be 20 bytes long") (pending) + it("should be 20 bytes long") { + signingPrivateKey should have length (20) + } } } diff --git a/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala b/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala index 97541c2d5d..6a9d450a5e 100644 --- a/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala +++ b/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala @@ -7,7 +7,11 @@ import org.scalatest.matchers.ShouldMatchers * @author str4d */ class SigningPublicKeySpec extends FunSpec with ShouldMatchers { + val signingPublicKey = new SigningPublicKey + describe("A SigningPublicKey") { - it("should be 128 bytes long") (pending) + it("should be 128 bytes long") { + signingPublicKey should have length (128) + } } } -- GitLab