1 23 24 package org.objectweb.fractal.adl.conform; 25 26 import org.objectweb.fractal.adl.ADLException; 27 import org.objectweb.fractal.adl.Loader; 28 import org.objectweb.fractal.adl.attributes.AttributeLoader; 29 import org.objectweb.fractal.adl.implementations.ImplementationLoader; 30 import org.objectweb.fractal.adl.xml.XMLLoader; 31 32 public class TestAttributes extends Test { 33 34 public Loader l; 35 36 public TestAttributes (final String name) { 37 super(name); 38 } 39 40 protected void setUp () { 41 ImplementationLoader implLoader = new ImplementationLoader(); 42 AttributeLoader attrLoader = new AttributeLoader(); 43 implLoader.clientLoader = new XMLLoader(false); 44 attrLoader.clientLoader = implLoader; 45 l = attrLoader; 46 } 47 48 public void test1 () throws ADLException { 49 assertNotNull(l.load("ATTR1", null)); 50 } 51 52 public void test2 () { 53 try { 54 l.load("ATTR2", null); 55 fail(); 56 } catch (ADLException e) { 57 } 58 } 59 60 public void test3 () { 61 try { 62 l.load("ATTR3", null); 63 fail(); 64 } catch (ADLException e) { 65 } 66 } 67 68 public void test4 () { 69 try { 70 l.load("ATTR4", null); 71 fail(); 72 } catch (ADLException e) { 73 } 74 } 75 76 public void test5 () { 77 try { 78 l.load("ATTR5", null); 79 fail(); 80 } catch (ADLException e) { 81 } 82 } 83 84 public void test6 () { 85 try { 86 l.load("ATTR6", null); 87 fail(); 88 } catch (ADLException e) { 89 } 90 } 91 92 public void test7 () { 93 try { 94 l.load("ATTR7", null); 95 fail(); 96 } catch (ADLException e) { 97 } 98 } 99 100 public void test8 () { 101 try { 102 l.load("ATTR8", null); 103 fail(); 104 } catch (ADLException e) { 105 } 106 } 107 108 public void test9 () { 109 try { 110 l.load("ATTR9", null); 111 fail(); 112 } catch (ADLException e) { 113 } 114 } 115 } 116 | Popular Tags |