From 36fdb4ee2f294e283a46cc3f56036249add10f48 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Tue, 23 Sep 2014 14:15:27 +0000 Subject: [PATCH] Fix junit compile fails due to data structure moves --- core/java/test/junit/net/i2p/data/DataTestSuite.java | 3 --- .../net/i2p/data/i2np/DatabaseStoreMessageTest.java | 4 ++-- .../net/i2p/data/router}/RouterAddressTest.java | 6 +++++- .../net/i2p/data/router}/RouterIdentityTest.java | 12 +++++++++++- .../junit/net/i2p/data/router}/RouterInfoTest.java | 12 +++++++++++- router/java/test/junit/net/i2p/router/SSUDemo.java | 4 ++-- .../net/i2p/router/message/BuildTestMessageJob.java | 2 +- .../router/networkdb/kademlia/RouterGenerator.java | 6 +++--- .../transport/BandwidthLimitedInputStream.java | 2 +- .../transport/BandwidthLimitedOutputStream.java | 2 +- .../net/i2p/router/transport/udp/UDPFlooder.java | 2 +- .../junit/net/i2p/router/tunnel/RouterTestBase.java | 4 ++-- 12 files changed, 40 insertions(+), 19 deletions(-) rename {core/java/test/junit/net/i2p/data => router/java/test/junit/net/i2p/data/router}/RouterAddressTest.java (96%) rename {core/java/test/junit/net/i2p/data => router/java/test/junit/net/i2p/data/router}/RouterIdentityTest.java (91%) rename {core/java/test/junit/net/i2p/data => router/java/test/junit/net/i2p/data/router}/RouterInfoTest.java (88%) diff --git a/core/java/test/junit/net/i2p/data/DataTestSuite.java b/core/java/test/junit/net/i2p/data/DataTestSuite.java index 4624929f84..a3253916f1 100644 --- a/core/java/test/junit/net/i2p/data/DataTestSuite.java +++ b/core/java/test/junit/net/i2p/data/DataTestSuite.java @@ -23,9 +23,6 @@ public class DataTestSuite { suite.addTestSuite(PayloadTest.class); suite.addTestSuite(PrivateKeyTest.class); suite.addTestSuite(PublicKeyTest.class); - suite.addTestSuite(RouterAddressTest.class); - suite.addTestSuite(RouterIdentityTest.class); - suite.addTestSuite(RouterInfoTest.class); suite.addTestSuite(SessionKeyTest.class); suite.addTestSuite(SignatureTest.class); suite.addTestSuite(SigningPrivateKeyTest.class); diff --git a/router/java/test/junit/net/i2p/data/i2np/DatabaseStoreMessageTest.java b/router/java/test/junit/net/i2p/data/i2np/DatabaseStoreMessageTest.java index d937d118b6..730c15f9fb 100644 --- a/router/java/test/junit/net/i2p/data/i2np/DatabaseStoreMessageTest.java +++ b/router/java/test/junit/net/i2p/data/i2np/DatabaseStoreMessageTest.java @@ -13,8 +13,8 @@ import org.junit.Test; import net.i2p.I2PAppContext; import net.i2p.data.DataFormatException; import net.i2p.data.DataStructure; -import net.i2p.data.RouterInfo; -import net.i2p.data.RouterInfoTest; +import net.i2p.data.router.RouterInfo; +import net.i2p.data.router.RouterInfoTest; import net.i2p.data.StructureTest; import net.i2p.util.Clock; diff --git a/core/java/test/junit/net/i2p/data/RouterAddressTest.java b/router/java/test/junit/net/i2p/data/router/RouterAddressTest.java similarity index 96% rename from core/java/test/junit/net/i2p/data/RouterAddressTest.java rename to router/java/test/junit/net/i2p/data/router/RouterAddressTest.java index 15a1e79290..090f7f4704 100644 --- a/core/java/test/junit/net/i2p/data/RouterAddressTest.java +++ b/router/java/test/junit/net/i2p/data/router/RouterAddressTest.java @@ -1,4 +1,4 @@ -package net.i2p.data; +package net.i2p.data.router; /* * free (adj.): unencumbered; not under the control of others * Written by jrandom in 2003 and released into the public domain @@ -11,6 +11,10 @@ package net.i2p.data; import java.io.ByteArrayOutputStream; import java.util.Properties; +import net.i2p.data.DataFormatException; +import net.i2p.data.DataStructure; +import net.i2p.data.StructureTest; + /** * Test harness for loading / storing Hash objects * diff --git a/core/java/test/junit/net/i2p/data/RouterIdentityTest.java b/router/java/test/junit/net/i2p/data/router/RouterIdentityTest.java similarity index 91% rename from core/java/test/junit/net/i2p/data/RouterIdentityTest.java rename to router/java/test/junit/net/i2p/data/router/RouterIdentityTest.java index e5fdc93e9e..9721d5df56 100644 --- a/core/java/test/junit/net/i2p/data/RouterIdentityTest.java +++ b/router/java/test/junit/net/i2p/data/router/RouterIdentityTest.java @@ -1,4 +1,4 @@ -package net.i2p.data; +package net.i2p.data.router; /* * free (adj.): unencumbered; not under the control of others * Written by jrandom in 2003 and released into the public domain @@ -10,6 +10,16 @@ package net.i2p.data; import java.io.ByteArrayOutputStream; +import net.i2p.data.Certificate; +import net.i2p.data.CertificateTest; +import net.i2p.data.DataFormatException; +import net.i2p.data.DataStructure; +import net.i2p.data.PublicKey; +import net.i2p.data.PublicKeyTest; +import net.i2p.data.SigningPublicKey; +import net.i2p.data.SigningPublicKeyTest; +import net.i2p.data.StructureTest; + /** * Test harness for loading / storing Hash objects * diff --git a/core/java/test/junit/net/i2p/data/RouterInfoTest.java b/router/java/test/junit/net/i2p/data/router/RouterInfoTest.java similarity index 88% rename from core/java/test/junit/net/i2p/data/RouterInfoTest.java rename to router/java/test/junit/net/i2p/data/router/RouterInfoTest.java index 6874ffa672..daf89cda3c 100644 --- a/core/java/test/junit/net/i2p/data/RouterInfoTest.java +++ b/router/java/test/junit/net/i2p/data/router/RouterInfoTest.java @@ -1,4 +1,4 @@ -package net.i2p.data; +package net.i2p.data.router; /* * free (adj.): unencumbered; not under the control of others * Written by jrandom in 2003 and released into the public domain @@ -12,6 +12,16 @@ import java.util.HashSet; import java.util.Properties; import net.i2p.crypto.KeyGenerator; +import net.i2p.data.Certificate; +import net.i2p.data.DataFormatException; +import net.i2p.data.DataStructure; +import net.i2p.data.Hash; +import net.i2p.data.HashTest; +import net.i2p.data.PrivateKey; +import net.i2p.data.PublicKey; +import net.i2p.data.SigningPrivateKey; +import net.i2p.data.SigningPublicKey; +import net.i2p.data.StructureTest; import net.i2p.util.Log; /** diff --git a/router/java/test/junit/net/i2p/router/SSUDemo.java b/router/java/test/junit/net/i2p/router/SSUDemo.java index 6e08c3aad8..5ae9ba101b 100644 --- a/router/java/test/junit/net/i2p/router/SSUDemo.java +++ b/router/java/test/junit/net/i2p/router/SSUDemo.java @@ -10,8 +10,8 @@ import net.i2p.I2PAppContext; import net.i2p.data.Base64; import net.i2p.data.DataFormatException; import net.i2p.data.Hash; -import net.i2p.data.RouterIdentity; -import net.i2p.data.RouterInfo; +import net.i2p.data.router.RouterIdentity; +import net.i2p.data.router.RouterInfo; import net.i2p.data.i2np.DatabaseStoreMessage; import net.i2p.data.i2np.I2NPMessage; import net.i2p.data.i2np.I2NPMessageException; diff --git a/router/java/test/junit/net/i2p/router/message/BuildTestMessageJob.java b/router/java/test/junit/net/i2p/router/message/BuildTestMessageJob.java index 85b172cce1..f8c4e13dfc 100644 --- a/router/java/test/junit/net/i2p/router/message/BuildTestMessageJob.java +++ b/router/java/test/junit/net/i2p/router/message/BuildTestMessageJob.java @@ -14,7 +14,7 @@ import java.util.Set; import net.i2p.data.Certificate; import net.i2p.data.Hash; import net.i2p.data.PublicKey; -import net.i2p.data.RouterInfo; +import net.i2p.data.router.RouterInfo; import net.i2p.data.SessionKey; import net.i2p.data.SessionTag; import net.i2p.data.i2np.DeliveryInstructions; diff --git a/router/java/test/junit/net/i2p/router/networkdb/kademlia/RouterGenerator.java b/router/java/test/junit/net/i2p/router/networkdb/kademlia/RouterGenerator.java index b8ae16225f..22a4995f9d 100644 --- a/router/java/test/junit/net/i2p/router/networkdb/kademlia/RouterGenerator.java +++ b/router/java/test/junit/net/i2p/router/networkdb/kademlia/RouterGenerator.java @@ -19,9 +19,9 @@ import net.i2p.crypto.KeyGenerator; import net.i2p.data.Certificate; import net.i2p.data.PrivateKey; import net.i2p.data.PublicKey; -import net.i2p.data.RouterAddress; -import net.i2p.data.RouterIdentity; -import net.i2p.data.RouterInfo; +import net.i2p.data.router.RouterAddress; +import net.i2p.data.router.RouterIdentity; +import net.i2p.data.router.RouterInfo; import net.i2p.data.SigningPrivateKey; import net.i2p.data.SigningPublicKey; import net.i2p.util.Clock; diff --git a/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedInputStream.java b/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedInputStream.java index a38ccbfe4c..5005797292 100644 --- a/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedInputStream.java +++ b/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedInputStream.java @@ -12,7 +12,7 @@ import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; -import net.i2p.data.RouterIdentity; +import net.i2p.data.router.RouterIdentity; import net.i2p.router.RouterContext; import net.i2p.util.Log; diff --git a/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedOutputStream.java b/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedOutputStream.java index a01f27071b..bc2c07b283 100644 --- a/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedOutputStream.java +++ b/router/java/test/junit/net/i2p/router/transport/BandwidthLimitedOutputStream.java @@ -12,7 +12,7 @@ import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; -import net.i2p.data.RouterIdentity; +import net.i2p.data.router.RouterIdentity; import net.i2p.router.RouterContext; import net.i2p.util.Log; diff --git a/router/java/test/junit/net/i2p/router/transport/udp/UDPFlooder.java b/router/java/test/junit/net/i2p/router/transport/udp/UDPFlooder.java index a5bdf5c623..1625c3fe12 100644 --- a/router/java/test/junit/net/i2p/router/transport/udp/UDPFlooder.java +++ b/router/java/test/junit/net/i2p/router/transport/udp/UDPFlooder.java @@ -3,7 +3,7 @@ package net.i2p.router.transport.udp; import java.util.ArrayList; import java.util.List; -import net.i2p.data.RouterInfo; +import net.i2p.data.router.RouterInfo; import net.i2p.data.i2np.DataMessage; import net.i2p.data.i2np.I2NPMessage; import net.i2p.router.OutNetMessage; diff --git a/router/java/test/junit/net/i2p/router/tunnel/RouterTestBase.java b/router/java/test/junit/net/i2p/router/tunnel/RouterTestBase.java index 9e700d0814..e308507dfe 100644 --- a/router/java/test/junit/net/i2p/router/tunnel/RouterTestBase.java +++ b/router/java/test/junit/net/i2p/router/tunnel/RouterTestBase.java @@ -1,8 +1,8 @@ package net.i2p.router.tunnel; import net.i2p.data.Hash; -import net.i2p.data.RouterIdentity; -import net.i2p.data.RouterInfo; +import net.i2p.data.router.RouterIdentity; +import net.i2p.data.router.RouterInfo; import net.i2p.router.Router; import net.i2p.router.RouterContext; -- GitLab