Bouncy Castle Cryptography Library 1.87

org.bouncycastle.util.encoders.test
Class Base64Test

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.bouncycastle.util.encoders.test.AbstractCoderTest
              extended byorg.bouncycastle.util.encoders.test.Base64Test
All Implemented Interfaces:
junit.framework.Test

public class Base64Test
extends AbstractCoderTest


Field Summary
 
Fields inherited from class org.bouncycastle.util.encoders.test.AbstractCoderTest
enc
 
Constructor Summary
Base64Test(java.lang.String name)
           
 
Method Summary
protected  boolean isEncodedChar(char c)
           
protected  char paddingChar()
           
protected  void setUp()
           
 void testDecodeStaysInsideSlice()
          decode(byte[], off, length, out) must not look at anything outside the slice: an empty slice produces nothing and a slice that ends part way through a block is rejected, whatever follows it.
 void testDecodeStringTruncated()
          decode(String, out) must reject a string that ends part way through a block, whatever whitespace follows it, rather than read past the last character.
 void testInvalidInput()
           
 void testSamples()
           
 void testWithWhitespace()
           
 
Methods inherited from class org.bouncycastle.util.encoders.test.AbstractCoderTest
testEncode
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Base64Test

public Base64Test(java.lang.String name)
Method Detail

setUp

protected void setUp()
Overrides:
setUp in class AbstractCoderTest

testSamples

public void testSamples()
                 throws java.io.IOException
Throws:
java.io.IOException

testInvalidInput

public void testInvalidInput()
                      throws java.io.IOException
Throws:
java.io.IOException

testDecodeStaysInsideSlice

public void testDecodeStaysInsideSlice()
                                throws java.io.IOException
decode(byte[], off, length, out) must not look at anything outside the slice: an empty slice produces nothing and a slice that ends part way through a block is rejected, whatever follows it.

Throws:
java.io.IOException

testDecodeStringTruncated

public void testDecodeStringTruncated()
                               throws java.io.IOException
decode(String, out) must reject a string that ends part way through a block, whatever whitespace follows it, rather than read past the last character.

Throws:
java.io.IOException

testWithWhitespace

public void testWithWhitespace()
                        throws java.lang.Exception
Throws:
java.lang.Exception

paddingChar

protected char paddingChar()
Specified by:
paddingChar in class AbstractCoderTest

isEncodedChar

protected boolean isEncodedChar(char c)
Specified by:
isEncodedChar in class AbstractCoderTest

Bouncy Castle Cryptography Library 1.87