From 5b6e7ba91d783565e3e4174faa7777851d23ff00 Mon Sep 17 00:00:00 2001 From: str4d Date: Mon, 30 Jul 2012 14:50:51 +0000 Subject: [PATCH] Added some skeleton Spec tests for various I2P data types in net.i2p.data --- .../java/test/scalatest/net/i2p/data/HashSpec.scala | 4 ++-- .../scalatest/net/i2p/data/PrivateKeySpec.scala | 13 +++++++++++++ .../test/scalatest/net/i2p/data/PublicKeySpec.scala | 13 +++++++++++++ .../scalatest/net/i2p/data/SessionKeySpec.scala | 13 +++++++++++++ .../scalatest/net/i2p/data/SessionTagSpec.scala | 13 +++++++++++++ .../test/scalatest/net/i2p/data/SignatureSpec.scala | 13 +++++++++++++ .../net/i2p/data/SigningPrivateKeySpec.scala | 13 +++++++++++++ .../net/i2p/data/SigningPublicKeySpec.scala | 13 +++++++++++++ .../test/scalatest/net/i2p/data/TunnelIdSpec.scala | 13 +++++++++++++ 9 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/SignatureSpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala create mode 100644 core/java/test/scalatest/net/i2p/data/TunnelIdSpec.scala diff --git a/core/java/test/scalatest/net/i2p/data/HashSpec.scala b/core/java/test/scalatest/net/i2p/data/HashSpec.scala index 71b7ccc30..ae925ed62 100644 --- a/core/java/test/scalatest/net/i2p/data/HashSpec.scala +++ b/core/java/test/scalatest/net/i2p/data/HashSpec.scala @@ -1,4 +1,4 @@ -package net.i2p.data; +package net.i2p.data import org.scalatest.FunSpec import org.scalatest.matchers.ShouldMatchers @@ -11,7 +11,7 @@ class HashSpec extends FunSpec with ShouldMatchers { describe("A Hash") { it("should be 32 bytes long") { - hash.length should be (32) + hash should have length (32) } } } diff --git a/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala b/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala new file mode 100644 index 000000000..583c329be --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/PrivateKeySpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class PrivateKeySpec extends FunSpec with ShouldMatchers { + describe("A PrivateKey") { + it("should be 256 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala b/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala new file mode 100644 index 000000000..5d131a8fd --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/PublicKeySpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class PublicKeySpec extends FunSpec with ShouldMatchers { + describe("A PublicKey") { + it("should be 256 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala b/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala new file mode 100644 index 000000000..77c62bcf6 --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/SessionKeySpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class SessionKeySpec extends FunSpec with ShouldMatchers { + describe("A SessionKey") { + it("should be 32 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala b/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala new file mode 100644 index 000000000..8a755bfc7 --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/SessionTagSpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class SessionTagSpec extends FunSpec with ShouldMatchers { + describe("A SessionTag") { + it("should be 32 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala b/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala new file mode 100644 index 000000000..ff17c365d --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/SignatureSpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class SignatureSpec extends FunSpec with ShouldMatchers { + describe("A Signature") { + it("should be 40 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala b/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala new file mode 100644 index 000000000..a4ad5ff33 --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/SigningPrivateKeySpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class SigningPrivateKeySpec extends FunSpec with ShouldMatchers { + describe("A SigningPrivateKey") { + it("should be 20 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala b/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala new file mode 100644 index 000000000..97541c2d5 --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/SigningPublicKeySpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class SigningPublicKeySpec extends FunSpec with ShouldMatchers { + describe("A SigningPublicKey") { + it("should be 128 bytes long") (pending) + } +} diff --git a/core/java/test/scalatest/net/i2p/data/TunnelIdSpec.scala b/core/java/test/scalatest/net/i2p/data/TunnelIdSpec.scala new file mode 100644 index 000000000..f7e872dd0 --- /dev/null +++ b/core/java/test/scalatest/net/i2p/data/TunnelIdSpec.scala @@ -0,0 +1,13 @@ +package net.i2p.data + +import org.scalatest.FunSpec +import org.scalatest.matchers.ShouldMatchers + +/** + * @author str4d + */ +class TunnelIdSpec extends FunSpec with ShouldMatchers { + describe("A TunnelId") { + it("should be a 4 byte integer") (pending) + } +}