KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > adl > conform > TestAttributes


1 /***
2  * Fractal ADL Parser
3  * Copyright (C) 2002-2004 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: Eric.Bruneton@rd.francetelecom.com
20  *
21  * Author: Eric Bruneton
22  */

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 JavaDoc 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