01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.workflow.attribute;
17:
18: import java.io.IOException;
19:
20: import javax.xml.xpath.XPathExpressionException;
21:
22: import org.kuali.kfs.context.KualiTestBase;
23: import org.kuali.test.ConfigureContext;
24:
25: import edu.iu.uis.eden.exception.InvalidXmlException;
26: import edu.iu.uis.eden.routeheader.DocumentContent;
27:
28: @ConfigureContext
29: public class KualiPayeeTaxIdAttributeTest extends KualiTestBase {
30:
31: private static final String PAYEE_MAINTENANCE_DOC_TYPE = "KualiPayeeMaintenanceDocument";
32:
33: public void testXPath() throws IOException, InvalidXmlException,
34: XPathExpressionException {
35: KualiPayeeTaxIdAttribute attribute = new KualiPayeeTaxIdAttribute();
36: DocumentContent docContent = KualiAttributeTestUtil
37: .getDocumentContentFromXmlFile(
38: KualiAttributeTestUtil.PAYEE_MAINTENANCE_NEWDOC,
39: PAYEE_MAINTENANCE_DOC_TYPE);
40:
41: String payeeTaxId = attribute.getPayeeTaxIdFromDocContent(null,
42: docContent);
43: assertEquals("111111111", payeeTaxId);
44:
45: }
46:
47: }
|