|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.hd.d.pg2k.test.dev.ExhibitUploadTest
public final class ExhibitUploadTest
Tests the exhibit upload mechanisms. May need to be running in a WAR container and in master mode for all tests to be operable (unless, exceptionally, the loopbackURL is pointing at another instance).
| Field Summary | |
|---|---|
static int |
MIN_UPLOAD_SPEED_BYTESPERSEC
Minimum binary upload speed in Bps (bytes per second); strictly positive. |
private static java.util.Random |
rnd
Private source of OK pseudo-random numbers. |
private java.io.File |
uploadDir
The upload directory, or null if none set. |
| Constructor Summary | |
|---|---|
ExhibitUploadTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
private static UploadInfoBean |
_makeTestUploadUIB(SimpleExhibitPipelineIF p,
java.lang.String suffix)
Makes a new random, legal UploadInfoBean for test purposes; never null. |
protected void |
setUp()
Do any setup needed for the tests. |
protected void |
tearDown()
Do any clearup needed after the tests. |
void |
testBatchUploaderResponseHandling()
Test send/receive of server response to batch-upload client. |
void |
testDirectUploadBad()
Verify that bad uploads are rejected. |
void |
testDirectUploadJPEG()
Test direct binary upload (of a JPEG image) for correctness. |
void |
testDirectUploadSimple()
Test simple upload (of non-binary data) directly, not over HTTP. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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 |
| Field Detail |
|---|
private java.io.File uploadDir
public static final int MIN_UPLOAD_SPEED_BYTESPERSEC
private static final java.util.Random rnd
| Constructor Detail |
|---|
public ExhibitUploadTest(java.lang.String name)
| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exception
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.Exception
public void testDirectUploadSimple()
throws java.lang.Exception
java.lang.Exception
private static UploadInfoBean _makeTestUploadUIB(SimpleExhibitPipelineIF p,
java.lang.String suffix)
throws java.io.IOException
May cause a jUnit assertion failure if it cannot do this successfully.
p - data pipeline for test data set;
must have at least one author and one category we can usesuffix - must be legal non-null suffix for the file type
to be uploaded, eg ".htxt" for HTML text, ".jpg" for a JPEG image
java.io.IOException - in case of difficulty with the data source
public void testDirectUploadJPEG()
throws java.lang.Exception
java.lang.Exception
public void testDirectUploadBad()
throws java.lang.Exception
java.lang.Exception
public void testBatchUploaderResponseHandling()
throws java.lang.Exception
java.lang.Exception
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||