forked from I2P_Developers/i2p.i2p
Tests: Add mockito classpath to core tests
javadocs for new test classes
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package net.i2p;
|
||||
|
||||
/**
|
||||
* @since 0.9.49
|
||||
*/
|
||||
public class TestContext extends I2PAppContext {
|
||||
|
||||
public TestContext() {
|
||||
@@ -7,7 +10,7 @@ public class TestContext extends I2PAppContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows overriding the existing I2PAppContext with a test context who's fields we may mock as we like
|
||||
* Allows overriding the existing I2PAppContext with a test context whose fields we may mock as we like
|
||||
*
|
||||
* @param ctx Our test context to replace the global context with
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,10 @@ import org.mockito.MockitoAnnotations;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class ConvertToHashMockTest{
|
||||
/**
|
||||
* @since 0.9.49
|
||||
*/
|
||||
public class ConvertToHashMockTest {
|
||||
|
||||
@Mock private NamingService namingService;
|
||||
@Mock private Destination destination;
|
||||
@@ -34,7 +37,7 @@ public class ConvertToHashMockTest{
|
||||
* We would otherwise pollute the other tests that depend on I2PAppContext
|
||||
*/
|
||||
@AfterClass
|
||||
public static void afterClass(){
|
||||
public static void afterClass() {
|
||||
TestContext.setGlobalContext(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @since 0.9.49
|
||||
*/
|
||||
public class ConvertToHashTest {
|
||||
private static final String zzzDotI2pBase32Hash = "lhbd7ojcaiofbfku7ixh47qj537g572zmhdc4oilvugzxdpdghua";
|
||||
private static final String zzzDotI2pBase64Hash = "WcI~uSICHFCVVPoufn4J7v5u~1lhxi45C60Nm43jMeg=";
|
||||
|
||||
Reference in New Issue
Block a user