Author: nick
Date: Wed Jun 26 15:28:25 2013
New Revision: 1496969

URL: http://svn.apache.org/r1496969
Log:
Fix inconsistent whitespace in HSMF test files

Modified:
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
    
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
    
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java
    
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
    
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java?rev=1496969&r1=1496968&r2=1496969&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java 
(original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java Wed 
Jun 26 15:28:25 2013
@@ -38,26 +38,26 @@ public final class TestBasics extends Te
    private MAPIMessage cyrillic;
    private MAPIMessage chinese;
 
-       /**
-        * Initialize this test, load up the blank.msg mapi message.
-        * @throws Exception
-        */
-       public TestBasics() throws IOException {
-        POIDataSamples samples = POIDataSamples.getHSMFInstance();
-               simple = new 
MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
-      quick  = new MAPIMessage(samples.openResourceAsStream("quick.msg"));
-      outlook30  = new 
MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
-      attachments = new 
MAPIMessage(samples.openResourceAsStream("attachment_test_msg.msg"));
-      noRecipientAddress = new 
MAPIMessage(samples.openResourceAsStream("no_recipient_address.msg"));
-      unicode = new 
MAPIMessage(samples.openResourceAsStream("example_received_unicode.msg"));
-      cyrillic = new 
MAPIMessage(samples.openResourceAsStream("cyrillic_message.msg"));
-      chinese = new 
MAPIMessage(samples.openResourceAsStream("chinese-traditional.msg"));
-       }
-       
-       /**
-        * Can we always get the recipient's email?
-        */
-       public void testRecipientEmail() throws Exception {
+   /**
+    * Initialize this test, load up the blank.msg mapi message.
+    * @throws Exception
+    */
+   public TestBasics() throws IOException {
+       POIDataSamples samples = POIDataSamples.getHSMFInstance();
+       simple = new 
MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
+       quick  = new MAPIMessage(samples.openResourceAsStream("quick.msg"));
+       outlook30  = new 
MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
+       attachments = new 
MAPIMessage(samples.openResourceAsStream("attachment_test_msg.msg"));
+       noRecipientAddress = new 
MAPIMessage(samples.openResourceAsStream("no_recipient_address.msg"));
+       unicode = new 
MAPIMessage(samples.openResourceAsStream("example_received_unicode.msg"));
+       cyrillic = new 
MAPIMessage(samples.openResourceAsStream("cyrillic_message.msg"));
+       chinese = new 
MAPIMessage(samples.openResourceAsStream("chinese-traditional.msg"));
+   }
+
+   /**
+    * Can we always get the recipient's email?
+    */
+   public void testRecipientEmail() throws Exception {
       assertEquals("[email protected]", 
simple.getRecipientEmailAddress());
       assertEquals("[email protected]", 
quick.getRecipientEmailAddress());
       assertEquals("[email protected]", 
attachments.getRecipientEmailAddress());
@@ -71,25 +71,25 @@ public final class TestBasics extends Te
                "[email protected]; [email protected]; 
[email protected]; [email protected]", 
             outlook30.getRecipientEmailAddress()
       );
-       }
-       
-       /**
-        * Test subject
-        */
-       public void testSubject() throws Exception {
+   }
+
+   /**
+    * Test subject
+    */
+   public void testSubject() throws Exception {
       assertEquals("test message", simple.getSubject());
       assertEquals("Test the content transformer", quick.getSubject());
       assertEquals("IN-SPIRE servers going down for a bit, back up around 
8am", outlook30.getSubject());
       assertEquals("test pi\u00e8ce jointe 1", attachments.getSubject());
-       }
-       
-       /**
-        * Test message headers
-        */
-       public void testHeaders() throws Exception {
-          // Simple email first
-          assertEquals(26, simple.getHeaders().length);
-          assertTrue(simple.getHeaders()[0].startsWith("Return-path:"));
+   }
+
+   /**
+    * Test message headers
+    */
+   public void testHeaders() throws Exception {
+      // Simple email first
+      assertEquals(26, simple.getHeaders().length);
+      assertTrue(simple.getHeaders()[0].startsWith("Return-path:"));
       assertTrue(simple.getHeaders()[1].equals("Envelope-to: 
[email protected]"));
       assertTrue(simple.getHeaders()[25].startsWith("X-Antivirus-Scanner: 
Clean"));
       
@@ -110,35 +110,35 @@ public final class TestBasics extends Te
       assertTrue(outlook30.getHeaders()[0].startsWith("Microsoft Mail Internet 
Headers"));
       assertTrue(outlook30.getHeaders()[1].startsWith("x-mimeole:"));
       assertTrue(outlook30.getHeaders()[32].startsWith("\t\"Williams")); // 
May need better parsing in future
-       }
-       
-       /**
-        * Test attachments
-        */
-       public void testAttachments() throws Exception {
+   }
+
+   /**
+    * Test attachments
+    */
+   public void testAttachments() throws Exception {
       assertEquals(0, simple.getAttachmentFiles().length);
       assertEquals(0, quick.getAttachmentFiles().length);
       assertEquals(0, outlook30.getAttachmentFiles().length);
       assertEquals(2, attachments.getAttachmentFiles().length);
-       }
-       
-       /**
-        * Test missing chunks.
-        * Use a file with no HTML body
-        */
-       public void testMissingChunks() throws Exception {
-          assertEquals(false, attachments.isReturnNullOnMissingChunk());
-
-          try {
-             attachments.getHtmlBody();
-             fail();
-          } catch(ChunkNotFoundException e) {
-             // Good
-          }
-          
-          attachments.setReturnNullOnMissingChunk(true);
-          
-          assertEquals(null, attachments.getHtmlBody());
+   }
+
+   /**
+    * Test missing chunks.
+    * Use a file with no HTML body
+    */
+   public void testMissingChunks() throws Exception {
+      assertEquals(false, attachments.isReturnNullOnMissingChunk());
+
+      try {
+          attachments.getHtmlBody();
+          fail();
+      } catch(ChunkNotFoundException e) {
+          // Good
+      }
+
+      attachments.setReturnNullOnMissingChunk(true);
+
+      assertEquals(null, attachments.getHtmlBody());
           
       attachments.setReturnNullOnMissingChunk(false);
       
@@ -148,13 +148,13 @@ public final class TestBasics extends Te
       } catch(ChunkNotFoundException e) {
          // Good
       }
-       }
-       
-       /**
-        * More missing chunk testing, this time for
-        *  missing recipient email address
-        */
-       public void testMissingAddressChunk() throws Exception {
+   }
+
+   /**
+    * More missing chunk testing, this time for
+    *  missing recipient email address
+    */
+   public void testMissingAddressChunk() throws Exception {
       assertEquals(false, noRecipientAddress.isReturnNullOnMissingChunk());
 
       try {
@@ -183,17 +183,17 @@ public final class TestBasics extends Te
       assertEquals("New Outlook User", noRecipientAddress.getDisplayTo());
       
       noRecipientAddress.setReturnNullOnMissingChunk(false);
-       }
-       
-       /**
-        * Test the 7 bit detection
-        */
-       public void test7BitDetection() throws Exception {
-          assertEquals(false, unicode.has7BitEncodingStrings());
+   }
+
+   /**
+    * Test the 7 bit detection
+    */
+   public void test7BitDetection() throws Exception {
+      assertEquals(false, unicode.has7BitEncodingStrings());
       assertEquals(true, simple.has7BitEncodingStrings());
       assertEquals(true, chinese.has7BitEncodingStrings());
       assertEquals(true, cyrillic.has7BitEncodingStrings());
-       }
+   }
        
    /**
     * We default to CP1252, but can sometimes do better

Modified: 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java?rev=1496969&r1=1496968&r2=1496969&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java 
(original)
+++ 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java 
Wed Jun 26 15:28:25 2013
@@ -28,99 +28,94 @@ import junit.framework.TestCase;
 
 /**
  * Tests to verify that the library can read blank msg files.
- *
- * @author Travis Ferguson
- *
  */
 public final class TestBlankFileRead extends TestCase {
-       private MAPIMessage mapiMessage;
+    private MAPIMessage mapiMessage;
 
-       /**
-        * Initialize this test, load up the blank.msg mapi message.
-        */
-       public TestBlankFileRead() throws IOException {
+    /**
+     * Initialize this test, load up the blank.msg mapi message.
+     */
+    public TestBlankFileRead() throws IOException {
         POIDataSamples samples = POIDataSamples.getHSMFInstance();
-               this.mapiMessage = new 
MAPIMessage(samples.openResourceAsStream("blank.msg"));
-       }
-
-       /**
-        * Check if we can read the body of the blank message, we expect "".
-        */
-       public void testReadBody() {
-               try {
-                       mapiMessage.getTextBody();
-               } catch(ChunkNotFoundException exp) {
-                       return;
-               }
-
-               TestCase.fail("Should have thrown a ChunkNotFoundException but 
didn't");
-       }
-
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        */
-       public void testReadDisplayCC() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayCC();
-               String expected = "";
-
-               TestCase.assertEquals(expected, obtained);
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        */
-       public void testReadDisplayTo() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayTo();
-               String expected = "";
-
-               TestCase.assertEquals(expected, obtained);
-       }
-
-       /**
-        * Test to see if we can read the FROM Chunk.
-        */
-       public void testReadDisplayFrom() {
-               try {
-                       mapiMessage.getDisplayFrom();
-               } catch(ChunkNotFoundException exp) {
-                       return;
-               }
-
-               TestCase.fail("Should have thrown a ChunkNotFoundException but 
didn't");
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        */
-       public void testReadDisplayBCC() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayBCC();
-               String expected = "";
-
-               TestCase.assertEquals(expected, obtained);
-       }
-
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        */
-       public void testReadSubject() throws Exception {
-               String obtained = mapiMessage.getSubject();
-               TestCase.assertEquals("", obtained);
-       }
-
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        */
-       public void testReadConversationTopic() {
-               try {
-                       mapiMessage.getConversationTopic();
-               } catch(ChunkNotFoundException exp) {
-                       return;
-               }
-               TestCase.fail("We shouldn't have a ConversationTopic node on 
the blank.msg file.");
-       }
-
+        this.mapiMessage = new 
MAPIMessage(samples.openResourceAsStream("blank.msg"));
+    }
 
+    /**
+     * Check if we can read the body of the blank message, we expect "".
+     */
+    public void testReadBody() {
+        try {
+            mapiMessage.getTextBody();
+        } catch(ChunkNotFoundException exp) {
+            return;
+        }
+
+        TestCase.fail("Should have thrown a ChunkNotFoundException but 
didn't");
+    }
+
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     */
+    public void testReadDisplayCC() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayCC();
+        String expected = "";
+
+        TestCase.assertEquals(expected, obtained);
+    }
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     */
+    public void testReadDisplayTo() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayTo();
+        String expected = "";
+
+        TestCase.assertEquals(expected, obtained);
+    }
+
+    /**
+     * Test to see if we can read the FROM Chunk.
+     */
+    public void testReadDisplayFrom() {
+        try {
+            mapiMessage.getDisplayFrom();
+        } catch(ChunkNotFoundException exp) {
+            return;
+        }
+
+        TestCase.fail("Should have thrown a ChunkNotFoundException but 
didn't");
+    }
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     */
+    public void testReadDisplayBCC() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayBCC();
+        String expected = "";
+
+        TestCase.assertEquals(expected, obtained);
+    }
+
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     */
+    public void testReadSubject() throws Exception {
+        String obtained = mapiMessage.getSubject();
+        TestCase.assertEquals("", obtained);
+    }
+
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     */
+    public void testReadConversationTopic() {
+        try {
+            mapiMessage.getConversationTopic();
+        } catch(ChunkNotFoundException exp) {
+            return;
+        }
+        TestCase.fail("We shouldn't have a ConversationTopic node on the 
blank.msg file.");
+    }
 }

Modified: 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java?rev=1496969&r1=1496968&r2=1496969&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java
 (original)
+++ 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java
 Wed Jun 26 15:28:25 2013
@@ -36,70 +36,68 @@ import org.apache.poi.poifs.filesystem.P
  *  ones, for example Submission Dates
  */
 public final class TestFixedSizedProperties extends POITestCase {
-       protected static final String messageSucceeds = "53784_succeeds.msg";
-       protected static final String messageFails = "53784_fails.msg";
-       private MAPIMessage mapiMessageSucceeds;
-       private MAPIMessage mapiMessageFails;
-       private POIFSFileSystem fsMessageSucceeds;
-       private POIFSFileSystem fsMessageFails; 
-
-       /**
-        * Initialize this test, load up the messages.
-        * 
-        * @throws Exception
-        */
-       public TestFixedSizedProperties() throws Exception {
-               POIDataSamples samples = POIDataSamples.getHSMFInstance();
-               this.mapiMessageSucceeds = new MAPIMessage(
-                               samples.openResourceAsStream(messageSucceeds));
-               this.mapiMessageFails = new MAPIMessage(
-                               samples.openResourceAsStream(messageFails));    
        
-               this.fsMessageSucceeds = new POIFSFileSystem(new 
FileInputStream(samples.getFile(messageSucceeds)));
-               this.fsMessageFails = new POIFSFileSystem(new 
FileInputStream(samples.getFile(messageFails)));
-       }
-
-       /**
-        * Test to see if we can read the Date Chunk with OutlookTextExtractor.
-        * TODO Work out why the Fri 22nd vs Monday 25th problem is occurring 
and fix
-        */
-       public void 
DISABLEDtestReadMessageDateSucceedsWithOutlookTextExtractor() {
-               OutlookTextExtactor ext = new 
OutlookTextExtactor(mapiMessageSucceeds);
-               String text = ext.getText();
+   protected static final String messageSucceeds = "53784_succeeds.msg";
+   protected static final String messageFails = "53784_fails.msg";
+   private MAPIMessage mapiMessageSucceeds;
+   private MAPIMessage mapiMessageFails;
+   private POIFSFileSystem fsMessageSucceeds;
+   private POIFSFileSystem fsMessageFails;     
 
-               assertContains(text, "Date: Fri, 22 Jun 2012 21:32:54\n");
-       }
+   /**
+    * Initialize this test, load up the messages.
+    */
+   public TestFixedSizedProperties() throws Exception {
+       POIDataSamples samples = POIDataSamples.getHSMFInstance();
+      this.mapiMessageSucceeds = new MAPIMessage(
+                samples.openResourceAsStream(messageSucceeds));
+      this.mapiMessageFails = new MAPIMessage(
+                samples.openResourceAsStream(messageFails));           
+      this.fsMessageSucceeds = new POIFSFileSystem(new 
FileInputStream(samples.getFile(messageSucceeds)));
+      this.fsMessageFails = new POIFSFileSystem(new 
FileInputStream(samples.getFile(messageFails)));
+   }
+
+   /**
+    * Test to see if we can read the Date Chunk with OutlookTextExtractor.
+    * TODO Work out why the Fri 22nd vs Monday 25th problem is occurring and 
fix
+    */
+   public void DISABLEDtestReadMessageDateSucceedsWithOutlookTextExtractor() {
+      OutlookTextExtactor ext = new OutlookTextExtactor(mapiMessageSucceeds);
+      String text = ext.getText();
+
+      assertContains(text, "Date: Fri, 22 Jun 2012 21:32:54\n");
+   }
 
-       /**
-        * Test to see if we can read the Date Chunk with OutlookTextExtractor.
+   /**
+    * Test to see if we can read the Date Chunk with OutlookTextExtractor.
     * TODO Work out why the Thu 21st vs Monday 25th problem is occurring and 
fix
-        */
-       public void DISABLEDtestReadMessageDateFailsWithOutlookTextExtractor() {
-               OutlookTextExtactor ext = new 
OutlookTextExtactor(mapiMessageFails);
-               String text = ext.getText();
-
-               assertContains(text, "Date: Thu, 21 Jun 2012 17:14:04\n");
-       }
-       
+    */
+   public void DISABLEDtestReadMessageDateFailsWithOutlookTextExtractor() {
+      OutlookTextExtactor ext = new OutlookTextExtactor(mapiMessageFails);
+      String text = ext.getText();
+
+      assertContains(text, "Date: Thu, 21 Jun 2012 17:14:04\n");
+   }
+
    /**
     * Test to see if we can read the Date Chunk with HSMFDump.
     * @throws IOException 
     */
    public void testReadMessageDateSucceedsWithHSMFDump() throws IOException {
-      PrintStream stream = new PrintStream(new ByteArrayOutputStream());
-      HSMFDump dump = new HSMFDump(fsMessageSucceeds);
-      dump.dump(stream);
+       PrintStream stream = new PrintStream(new ByteArrayOutputStream());
+       HSMFDump dump = new HSMFDump(fsMessageSucceeds);
+       dump.dump(stream);
    }   
-       
+
    /**
     * Test to see if we can read the Date Chunk with HSMFDump.
     * @throws Exception 
     */
    public void testReadMessageDateFailsWithHSMFDump() throws Exception {
-      PrintStream stream = new PrintStream(new ByteArrayOutputStream());
-      HSMFDump dump = new HSMFDump(fsMessageFails);
-      dump.dump(stream);
+       PrintStream stream = new PrintStream(new ByteArrayOutputStream());
+       HSMFDump dump = new HSMFDump(fsMessageFails);
+       dump.dump(stream);
    }
-       
+
    /**
     * TODO Work out why the Fri 22nd vs Monday 25th problem is occurring and 
fix
     */

Modified: 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java?rev=1496969&r1=1496968&r2=1496969&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
 (original)
+++ 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
 Wed Jun 26 15:28:25 2013
@@ -29,117 +29,117 @@ import junit.framework.TestCase;
  * Tests to verify that we can still work on the newer Outlook 3.0 files.
  */
 public final class TestOutlook30FileRead extends TestCase {
-private MAPIMessage mapiMessage;
+    private MAPIMessage mapiMessage;
 
-       /**
-        * Initialize this test, load up the blank.msg mapi message.
-        * @throws Exception
-        */
-       public TestOutlook30FileRead() throws IOException {
+    /**
+     * Initialize this test, load up the blank.msg mapi message.
+     * @throws Exception
+     */
+    public TestOutlook30FileRead() throws IOException {
         POIDataSamples samples = POIDataSamples.getHSMFInstance();
-               this.mapiMessage = new 
MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
-       }
+        this.mapiMessage = new 
MAPIMessage(samples.openResourceAsStream("outlook_30_msg.msg"));
+    }
 
-       /**
-        * Test to see if we can read the CC Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayCC() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayCC();
-               String expected = "";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayTo() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayTo();
-
-               assertTrue(obtained.startsWith("Bohn, Shawn"));
-       }
-
-       /**
-        * Test to see if we can read the From Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayFrom() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayFrom();
-               String expected = "Cramer, Nick";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayBCC() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayBCC();
-               String expected = "";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-
-       /**
-        * Check if we can read the body of the blank message, we expect "".
-        *
-        * @throws Exception
-        */
-       public void testReadBody() throws Exception {
-               String obtained = mapiMessage.getTextBody();
-               assertTrue(obtained.startsWith("I am shutting down"));
-       }
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        *
-        * @throws Exception
-        */
-       public void testReadSubject() throws Exception {
-               String obtained = mapiMessage.getSubject();
-               String expected = "IN-SPIRE servers going down for a bit, back 
up around 8am";
-
-               TestCase.assertEquals(expected, obtained);
-       }
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        *
-        * @throws Exception
-        */
-       public void testReadConversationTopic() throws Exception {
-               String obtained = mapiMessage.getConversationTopic();
-               TestCase.assertEquals("IN-SPIRE servers going down for a bit, 
back up around 8am", obtained);
-       }
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        *
-        * @throws Exception
-        */
-       public void testReadMessageClass() throws Exception {
-               String obtained = mapiMessage.getMessageClass();
-               TestCase.assertEquals("IPM.Note", obtained);
-       }
-   
-   /**
-    * Ensure we can get the HTML and RTF versions
-    */
-   public void testReadBodyContents() throws Exception {
-      String html = mapiMessage.getHtmlBody();
-      String rtf = mapiMessage.getRtfBody();
-      assertNotNull(html);
-      assertNotNull(rtf);
-      
-      assertTrue("Wrong text:\n" + html, html.startsWith("<!DOCTYPE"));
-      assertTrue("Wrong text:\n" + rtf,  rtf.startsWith("{\\rtf1"));
-   }
+    /**
+     * Test to see if we can read the CC Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayCC() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayCC();
+        String expected = "";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayTo() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayTo();
+
+        assertTrue(obtained.startsWith("Bohn, Shawn"));
+    }
+
+    /**
+     * Test to see if we can read the From Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayFrom() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayFrom();
+        String expected = "Cramer, Nick";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayBCC() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayBCC();
+        String expected = "";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+
+    /**
+     * Check if we can read the body of the blank message, we expect "".
+     *
+     * @throws Exception
+     */
+    public void testReadBody() throws Exception {
+        String obtained = mapiMessage.getTextBody();
+        assertTrue(obtained.startsWith("I am shutting down"));
+    }
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     *
+     * @throws Exception
+     */
+    public void testReadSubject() throws Exception {
+        String obtained = mapiMessage.getSubject();
+        String expected = "IN-SPIRE servers going down for a bit, back up 
around 8am";
+
+        TestCase.assertEquals(expected, obtained);
+    }
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     *
+     * @throws Exception
+     */
+    public void testReadConversationTopic() throws Exception {
+        String obtained = mapiMessage.getConversationTopic();
+        TestCase.assertEquals("IN-SPIRE servers going down for a bit, back up 
around 8am", obtained);
+    }
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     *
+     * @throws Exception
+     */
+    public void testReadMessageClass() throws Exception {
+        String obtained = mapiMessage.getMessageClass();
+        TestCase.assertEquals("IPM.Note", obtained);
+    }
+
+    /**
+     * Ensure we can get the HTML and RTF versions
+     */
+    public void testReadBodyContents() throws Exception {
+        String html = mapiMessage.getHtmlBody();
+        String rtf = mapiMessage.getRtfBody();
+        assertNotNull(html);
+        assertNotNull(rtf);
+
+        assertTrue("Wrong text:\n" + html, html.startsWith("<!DOCTYPE"));
+        assertTrue("Wrong text:\n" + rtf,  rtf.startsWith("{\\rtf1"));
+    }
 }

Modified: 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java?rev=1496969&r1=1496968&r2=1496969&view=diff
==============================================================================
--- 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java 
(original)
+++ 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java 
Wed Jun 26 15:28:25 2013
@@ -26,117 +26,112 @@ import org.apache.poi.POIDataSamples;
 import junit.framework.TestCase;
 
 /**
- * Tests to verify that we can read a simple msg file, that is in plain/text 
format with no attachments
- * or extra recipents.
- *
- * @author Travis Ferguson
+ * Tests to verify that we can read a simple msg file, that is in plain/text
+ *  format with no attachments or extra recipents.
  */
 public final class TestSimpleFileRead extends TestCase {
-private MAPIMessage mapiMessage;
+    private MAPIMessage mapiMessage;
 
-       /**
-        * Initialize this test, load up the blank.msg mapi message.
-        * @throws Exception
-        */
-       public TestSimpleFileRead() throws IOException {
+    /**
+     * Initialize this test, load up the blank.msg mapi message.
+     * @throws Exception
+     */
+    public TestSimpleFileRead() throws IOException {
         POIDataSamples samples = POIDataSamples.getHSMFInstance();
-               this.mapiMessage = new 
MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayCC() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayCC();
-               String expected = "";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayTo() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayTo();
-               String expected = "[email protected]";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-       /**
-        * Test to see if we can read the From Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayFrom() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayFrom();
-               String expected = "Travis Ferguson";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-       /**
-        * Test to see if we can read the CC Chunk.
-        * @throws ChunkNotFoundException
-        *
-        */
-       public void testReadDisplayBCC() throws ChunkNotFoundException {
-               String obtained = mapiMessage.getDisplayBCC();
-               String expected = "";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-
-       /**
-        * Check if we can read the body of the blank message, we expect "".
-        *
-        * @throws Exception
-        */
-       public void testReadBody() throws Exception {
-               String obtained = mapiMessage.getTextBody();
-               String expected = "This is a test message.";
-
-               TestCase.assertEquals(obtained, expected);
-       }
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        *
-        * @throws Exception
-        */
-       public void testReadSubject() throws Exception {
-               String obtained = mapiMessage.getSubject();
-               String expected = "test message";
-
-               TestCase.assertEquals(expected, obtained);
-       }
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        *
-        * @throws Exception
-        */
-       public void testReadConversationTopic() throws Exception {
-               String obtained = mapiMessage.getConversationTopic();
-               TestCase.assertEquals("test message", obtained);
-       }
-
-
-       /**
-        * Check if we can read the subject line of the blank message, we 
expect ""
-        *
-        * @throws Exception
-        */
-       public void testReadMessageClass() throws Exception {
-               String obtained = mapiMessage.getMessageClass();
-               TestCase.assertEquals("IPM.Note", obtained);
-       }
-
-
+        this.mapiMessage = new 
MAPIMessage(samples.openResourceAsStream("simple_test_msg.msg"));
+    }
 
+    /**
+     * Test to see if we can read the CC Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayCC() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayCC();
+        String expected = "";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayTo() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayTo();
+        String expected = "[email protected]";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+    /**
+     * Test to see if we can read the From Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayFrom() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayFrom();
+        String expected = "Travis Ferguson";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+    /**
+     * Test to see if we can read the CC Chunk.
+     * @throws ChunkNotFoundException
+     *
+     */
+    public void testReadDisplayBCC() throws ChunkNotFoundException {
+        String obtained = mapiMessage.getDisplayBCC();
+        String expected = "";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+
+    /**
+     * Check if we can read the body of the blank message, we expect "".
+     *
+     * @throws Exception
+     */
+    public void testReadBody() throws Exception {
+        String obtained = mapiMessage.getTextBody();
+        String expected = "This is a test message.";
+
+        TestCase.assertEquals(obtained, expected);
+    }
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     *
+     * @throws Exception
+     */
+    public void testReadSubject() throws Exception {
+        String obtained = mapiMessage.getSubject();
+        String expected = "test message";
+
+        TestCase.assertEquals(expected, obtained);
+    }
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     *
+     * @throws Exception
+     */
+    public void testReadConversationTopic() throws Exception {
+        String obtained = mapiMessage.getConversationTopic();
+        TestCase.assertEquals("test message", obtained);
+    }
+
+
+    /**
+     * Check if we can read the subject line of the blank message, we expect ""
+     *
+     * @throws Exception
+     */
+    public void testReadMessageClass() throws Exception {
+        String obtained = mapiMessage.getMessageClass();
+        TestCase.assertEquals("IPM.Note", obtained);
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to