1 23 24 package org.objectweb.fractal.adl.conform; 25 26 import org.objectweb.fractal.adl.ADLException; 27 import org.objectweb.fractal.adl.Definition; 28 import org.objectweb.fractal.adl.Loader; 29 import org.objectweb.fractal.adl.components.ComponentLoader; 30 import org.objectweb.fractal.adl.xml.XMLLoader; 31 32 public class TestReferences extends Test { 33 34 public Loader l; 35 36 public TestReferences (final String name) { 37 super(name); 38 } 39 40 protected void setUp () { 41 ComponentLoader compLoader = new ComponentLoader(); 42 compLoader.clientLoader = new XMLLoader(false); 43 l = compLoader; 44 } 45 46 public void test1 () throws ADLException { 47 l.load("REF1", null); 48 Definition d2 = l.load("REF2", null); 49 Definition d3 = l.load("REF3", null); 50 compare(d2, d3); 51 } 52 53 public void test2 () throws ADLException { 54 Definition d1 = l.load("REF4", null); 55 Definition d2 = l.load("REF5", null); 56 compare(d1, d2); 57 } 58 59 public void test3 () throws ADLException { 60 Definition d1 = l.load("REF6", null); 61 Definition d2 = l.load("REF7", null); 62 compare(d1, d2); 63 } 64 65 public void test4 () throws ADLException { 66 l.load("REF8", null); 67 Definition d2 = l.load("REF9", null); 68 Definition d3 = l.load("REF10", null); 69 compare(d2, d3); 70 } 71 72 public void test5 () throws ADLException { 73 Definition d1 = l.load("REF11", null); 74 Definition d2 = l.load("REF12", null); 75 compare(d1, d2); 76 } 77 78 public void test6 () throws ADLException { 79 Definition d1 = l.load("REF13", null); 80 Definition d2 = l.load("REF14", null); 81 compare(d1, d2); 82 } 83 84 public void test7 () throws ADLException { 85 l.load("REF15", null); 86 Definition d2 = l.load("REF16", null); 87 Definition d3 = l.load("REF17", null); 88 compare(d2, d3); 89 } 90 91 public void test8 () throws ADLException { 92 try { 93 l.load("REF18", null); 94 fail(); 95 } catch (ADLException e) { 96 } 97 } 98 99 public void test9 () throws ADLException { 100 try { 101 l.load("REF19", null); 102 fail(); 103 } catch (ADLException e) { 104 } 105 } 106 } 107 | Popular Tags |