Tests: Add mockito classpath to core tests

javadocs for new test classes
This commit is contained in:
zzz
2021-01-23 09:47:22 -05:00
parent 4776080ce6
commit 5e5886395c
5 changed files with 27 additions and 5 deletions

View File

@@ -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
*/

View File

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

View File

@@ -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=";