Added some skeleton Spec tests for various I2P data types in net.i2p.data

This commit is contained in:
str4d
2012-07-30 14:50:51 +00:00
parent 691ce6fec7
commit 5b6e7ba91d
9 changed files with 106 additions and 2 deletions

View File

@ -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)
}
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}