public void ReadCharacterQuartet_InterspersedWhitespace()
 {
     char[] buffer = new char[4];
     using (var inputReader = new StringReader(" f r e d "))
     {
         Assert.AreEqual(4, Base64DecodingStream.ReadCharacterQuartet(inputReader, buffer));
         CollectionAssert.AreEqual("fred", buffer);
     }
 }
 public void ReadCharacterQuartet_IncompleteQuartetAndWhitespaceAtEnd()
 {
     char[] buffer = new char[4];
     using (var inputReader = new StringReader("fr  "))
     {
         Assert.AreEqual(2, Base64DecodingStream.ReadCharacterQuartet(inputReader, buffer));
         Assert.AreEqual('f', buffer[0]);
         Assert.AreEqual('r', buffer[1]);
     }
 }
 public void ReadCharacterQuartet_Empty()
 {
     char[] buffer = new char[4];
     using (var inputReader = new StringReader(""))
     {
         Assert.AreEqual(0, Base64DecodingStream.ReadCharacterQuartet(inputReader, buffer));
         for (int i = 0; i < 4; i++)
         {
             Assert.AreEqual(0, buffer[i]);
         }
     }
 }