Changeset 7510


Ignore:
Timestamp:
01/11/11 21:11:56 (9 years ago)
Author:
aivar
Message:

Added new tests during test-driven development.

Location:
branches/maven/projects/deep-zoom-plugin/src/test/java/loci/workflow
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/maven/projects/deep-zoom-plugin/src/test/java/loci/workflow/SerializeDeserializeTest.java

    r7497 r7510  
    7676    } 
    7777 
    78     public void testFinalize() 
    79     { 
    80         TestComponent testComponentA = new TestComponent(); 
    81         testComponentA.setName("A"); 
    82         testComponentA.setInputNames(new String[] { "ONE", "TWO" }); 
    83         testComponentA.setOutputNames(new String[] { Output.DEFAULT }); 
    84         TestComponent testComponentB = new TestComponent(); 
    85         testComponentB.setName("B"); 
    86         testComponentB.setInputNames(new String[] { Input.DEFAULT } ); 
    87         testComponentB.setOutputNames(new String[] { Output.DEFAULT }); 
    88  
    89  
    90         WorkFlow workFlow1 = new WorkFlow(); 
    91         workFlow1.setName("workFlow1"); 
    92         workFlow1.add(testComponentA); 
    93         workFlow1.add(testComponentB); 
    94         workFlow1.wire(testComponentA, testComponentB); 
    95         workFlow1.finalize(); 
    96  
    97         assertTrue(workFlow1.getInputNames().length == 2); 
    98         assertTrue(workFlow1.getInputNames()[0].equals("ONE")); 
    99         assertTrue(workFlow1.getInputNames()[1].equals("TWO")); 
    100         assertTrue(workFlow1.getOutputNames().length == 1); 
    101         assertTrue(workFlow1.getOutputNames()[0].equals("OUTPUT")); 
    102     } 
    10378} 
  • branches/maven/projects/deep-zoom-plugin/src/test/java/loci/workflow/TestComponent.java

    r7495 r7510  
    99import java.util.List; 
    1010 
    11  
    12 import loci.plugin.ImageWrapper; 
    1311import loci.plugin.annotations.Input; 
    1412import loci.plugin.annotations.Output; 
     13import loci.workflow.plugin.ItemWrapper; 
     14import loci.workflow.plugin.IPluginLauncher; 
    1515import loci.util.xmllight.XMLException; 
    1616import loci.util.xmllight.XMLParser; 
     
    5858    } 
    5959 
     60    public IPluginLauncher getLauncher() { 
     61        return null; 
     62    } 
     63 
    6064    /** 
    6165     * Saves component as XML string representation. 
     
    227231     * @param image 
    228232     */ 
    229     public void input(ImageWrapper image) { 
     233    public void input(ItemWrapper image) { 
    230234        input(image, Input.DEFAULT); 
    231235    } 
     
    237241     * @param name 
    238242     */ 
    239     public void input(ImageWrapper image, String name) { 
     243    public void input(ItemWrapper image, String name) { 
    240244        //TODO 
    241245    } 
Note: See TracChangeset for help on using the changeset viewer.