1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.yaml.snakeyaml;
18
19 import junit.framework.TestCase;
20
21 import org.yaml.snakeyaml.constructor.ArrayTagsTest.CarWithArray;
22 import org.yaml.snakeyaml.nodes.Tag;
23
24 public class TypeDescriptionTest extends TestCase {
25
26 public void testSetTag() {
27 TypeDescription descr = new TypeDescription(TypeDescriptionTest.class);
28 descr.setTag("!bla");
29 assertEquals(new Tag("!bla"), descr.getTag());
30 descr.setTag(new Tag("!foo"));
31 assertEquals(new Tag("!foo"), descr.getTag());
32 }
33
34 public void testToString() {
35 TypeDescription carDescription = new TypeDescription(CarWithArray.class, "!car");
36 assertEquals(
37 "TypeDescription for class org.yaml.snakeyaml.constructor.ArrayTagsTest$CarWithArray (tag='!car')",
38 carDescription.toString());
39 }
40 }