1 package org.tigris.scarab.om; 2 3 48 49 import java.util.List ; 50 51 import org.apache.torque.om.NumberKey; 52 import org.tigris.scarab.test.BaseScarabTestCase; 53 54 60 public class AttributeTest extends BaseScarabTestCase 61 { 62 63 64 public void testGetAllAttributeOptions() 65 throws Exception 66 { 67 Attribute attribute = 69 AttributeManager.getInstance(new NumberKey(6)); 70 71 List result = attribute.getAttributeOptions(true); 72 System.out.println ("All Attribute Options Size (include deleted): " + result.size()); 73 assertEquals (result.size(), 44); 74 result = attribute.getAttributeOptions(false); 75 System.out.println ("All Attribute Options Size (exclude deleted): " + result.size()); 76 assertEquals (result.size(), 44); 77 } 78 79 public void testSortAttributeOptions() 80 throws Exception 81 { 82 Attribute attribute = 83 AttributeManager.getInstance(new NumberKey(6)); 84 List before = attribute.getAttributeOptions(); 85 List after = attribute.getAttributeOptions(); 86 System.out.println ("Options Size Before: " + before.size()); 87 System.out.println ("Options Size After: " + after.size()); 88 90 for (int i=0; i<after.size(); i++) 91 { 92 } 97 } 98 } 99 | Popular Tags |