com.atlassian.core.util.thumbnail
Class ThumberTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.core.util.thumbnail.ThumberTest
All Implemented Interfaces:
junit.framework.Test

public class ThumberTest
extends junit.framework.TestCase

This tests vary on the level of abstraction tested. The reason is that I did not want to change public interface (method visibility) of Thumber class (in order to keep clients compatible). Thus sometimes higher level methods are tested and the test are not really unit -> e.g. testing Thumber.retrieveOrCreateThumbNail(java.io.InputStream, String, java.io.File, int, int, long)


Constructor Summary
ThumberTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testAllCmykImagesShouldBeLoaded()
           
 void testRetrieveOrCreateThumbnailBrokenGif()
           
 void testRetrieveOrCreateThumbnailCMYKJpg()
           
 void testRetrieveOrCreateThumbnailJpg()
           
 void testRetrieveOrCreateThumbnailJpgAsStream()
           
 void testRetrieveOrCreateThumbnailOpaqueGif()
           
 void testRetrieveOrCreateThumbnailOpaqueGifAsStream()
           
 void testRetrieveOrCreateThumbnailOpaquePng()
           
 void testRetrieveOrCreateThumbnailOpaquePngAsStream()
           
 void testRetrieveOrCreateThumbnailTransparentGif()
           
 void testRetrieveOrCreateThumbnailTransparentGifAsStream()
           
 void testRetrieveOrCreateThumbnailTransparentPng()
           
 void testScaleImageForNonBufferedImage()
           
 void testScaleImageForNonBufferedImageTransparentGif()
           
 void testScaleImageUpscaling()
           
 void testScaleImageWithInvalidParams()
           
 void testUpscalingShouldReturnOriginalSize()
           
 
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThumberTest

public ThumberTest()
            throws IOException
Throws:
IOException
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

testRetrieveOrCreateThumbnailTransparentPng

public void testRetrieveOrCreateThumbnailTransparentPng()
                                                 throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailBrokenGif

public void testRetrieveOrCreateThumbnailBrokenGif()
                                            throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailOpaqueGif

public void testRetrieveOrCreateThumbnailOpaqueGif()
                                            throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailOpaqueGifAsStream

public void testRetrieveOrCreateThumbnailOpaqueGifAsStream()
                                                    throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailOpaquePng

public void testRetrieveOrCreateThumbnailOpaquePng()
                                            throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailOpaquePngAsStream

public void testRetrieveOrCreateThumbnailOpaquePngAsStream()
                                                    throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailJpg

public void testRetrieveOrCreateThumbnailJpg()
                                      throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailJpgAsStream

public void testRetrieveOrCreateThumbnailJpgAsStream()
                                              throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailTransparentGif

public void testRetrieveOrCreateThumbnailTransparentGif()
                                                 throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailTransparentGifAsStream

public void testRetrieveOrCreateThumbnailTransparentGifAsStream()
                                                         throws IOException
Throws:
IOException

testRetrieveOrCreateThumbnailCMYKJpg

public void testRetrieveOrCreateThumbnailCMYKJpg()
                                          throws IOException
Throws:
IOException

testAllCmykImagesShouldBeLoaded

public void testAllCmykImagesShouldBeLoaded()
                                     throws Exception
Throws:
Exception

testScaleImageForNonBufferedImage

public void testScaleImageForNonBufferedImage()

testScaleImageForNonBufferedImageTransparentGif

public void testScaleImageForNonBufferedImageTransparentGif()

testUpscalingShouldReturnOriginalSize

public void testUpscalingShouldReturnOriginalSize()
                                           throws IOException
Throws:
IOException

testScaleImageUpscaling

public void testScaleImageUpscaling()
                             throws IOException
Throws:
IOException

testScaleImageWithInvalidParams

public void testScaleImageWithInvalidParams()
                                     throws IOException
Throws:
IOException


Copyright © 2015 Atlassian. All rights reserved.