1 15 package org.apache.tapestry.junit; 16 17 import org.apache.tapestry.multipart.ValuePart; 18 19 26 public class TestMultipart extends TapestryTestCase 27 { 28 29 public void testSingle() 30 { 31 ValuePart p = new ValuePart("first"); 32 33 assertEquals(1, p.getCount()); 34 assertEquals("first", p.getValue()); 35 36 checkList("values", new String [] 37 { "first" }, p.getValues()); 38 } 39 40 public void testTwo() 41 { 42 ValuePart p = new ValuePart("alpha"); 43 44 p.add("beta"); 45 46 assertEquals(2, p.getCount()); 47 assertEquals("alpha", p.getValue()); 48 checkList("values", new String [] 49 { "alpha", "beta" }, p.getValues()); 50 } 51 52 public void testThree() 53 { 54 ValuePart p = new ValuePart("moe"); 55 p.add("larry"); 56 p.add("curly"); 57 58 checkList("values", new String [] 59 { "moe", "larry", "curly" }, p.getValues()); 60 } 61 } 62 | Popular Tags |