01: /*
02: * User: Michael Rettig
03: * Date: Sep 15, 2002
04: * Time: 8:56:12 PM
05: */
06: package net.sourceforge.jaxor.parser.tests;
07:
08: import net.sourceforge.jaxor.example.tests.JaxorTestCase;
09: import net.sourceforge.jaxor.parser.Attribute;
10: import net.sourceforge.jaxor.parser.XmlProxy;
11: import net.sourceforge.jaxor.tests.Invoker;
12: import org.xml.sax.Attributes;
13: import org.xml.sax.helpers.LocatorImpl;
14:
15: public class XmlProxyTest extends JaxorTestCase {
16:
17: public void testSetting() {
18: XmlProxy proxy = new XmlProxy(new Attribute(),
19: new LocatorImpl());
20: proxy.set("name", "value");
21: assertEquals("value", ((Attribute) proxy.getObject()).getName());
22: }
23:
24: public void testMockAttributeList() {
25: Invoker.invoke(new MockAttributeList());
26: }
27:
28: private static class MockAttributeList implements Attributes {
29: public int getIndex(String s) {
30: return 0;
31: }
32:
33: public int getIndex(String s, String s1) {
34: return 0;
35: }
36:
37: public int getLength() {
38: return 0;
39: }
40:
41: public String getLocalName(int i) {
42: return null;
43: }
44:
45: public String getQName(int i) {
46: return null;
47: }
48:
49: public String getType(int i) {
50: return null;
51: }
52:
53: public String getType(String s) {
54: return null;
55: }
56:
57: public String getType(String s, String s1) {
58: return null;
59: }
60:
61: public String getURI(int i) {
62: return null;
63: }
64:
65: public String getValue(int i) {
66: return null;
67: }
68:
69: public String getValue(String s) {
70: return null;
71: }
72:
73: public String getValue(String s, String s1) {
74: return null;
75: }
76: }
77: }
|