Initial import.
[clinton/mirror/jspi/.git] / jspi / src / main / java / de / lohndirekt / print / attribute / IppAttributeNameTest.java
CommitLineData
3ea135bb 1/**\r
2 * Copyright (C) 2003 <a href="http://www.lohndirekt.de/">lohndirekt.de</a>\r
3 *\r
4 * This library is free software; you can redistribute it and/or\r
5 * modify it under the terms of the GNU Lesser General Public\r
6 * License as published by the Free Software Foundation; either\r
7 * version 2.1 of the License, or (at your option) any later version.\r
8 * \r
9 * This library is distributed in the hope that it will be useful,\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
12 * Lesser General Public License for more details.\r
13 * \r
14 * You should have received a copy of the GNU Lesser General Public\r
15 * License along with this library; if not, write to the Free Software\r
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
17 * \r
18 */\r
19package de.lohndirekt.print.attribute;\r
20\r
21import java.util.Locale;\r
22\r
23import junit.framework.TestCase;\r
24import de.lohndirekt.print.attribute.ipp.UnknownAttribute;\r
25\r
26/**\r
27 * @author bpusch\r
28 *\r
29 * \r
30 */\r
31public class IppAttributeNameTest extends TestCase {\r
32\r
33 /**\r
34 * Constructor for IppAttributeNameTest.\r
35 * @param name\r
36 */\r
37 public IppAttributeNameTest(String name) {\r
38 super(name);\r
39 }\r
40\r
41 \r
42 /*\r
43 * Test for IppAttributeName get(String)\r
44 */\r
45 public void testGetString() {\r
46 IppAttributeName attributeName = IppAttributeName.get("attribute-does-not-exist");\r
47 assertNotNull("IppAttributeName is null",attributeName);\r
48 assertEquals("IppAttributeName should be UNKNOWN_ATTRIBUTE", attributeName.getCategory(), new UnknownAttribute("x",Locale.getDefault()).getCategory());\r
49 }\r
50\r
51 /*\r
52 * Test for IppAttributeName get(Class)\r
53 */\r
54 public void testGetClass() {\r
55 IppAttributeName attributeName = IppAttributeName.get(String.class);\r
56 assertNotNull("IppAttributeName is null",attributeName);\r
57 assertEquals("IppAttributeName should be UNKNOWN_ATTRIBUTE", attributeName.getCategory(), new UnknownAttribute("x",Locale.getDefault()).getCategory());\r
58 }\r
59\r
60}\r