📄 schemavalidatertest.java
字号:
/**
*
* SchemaValidaterTest.java
*
* Created on 2003-5-18 11:42:23
*
*/
package com.liuyang.ejb.xml.validation.test;
import com.liuyang.ejb.xml.validation.Validator;
import junit.framework.Assert;
import junit.framework.TestCase;
/**
* @author
* <a href="mailto:jdcyang@yahoo.com.cn">刘洋</a>
*/
public class SchemaValidaterTest extends TestCase {
private Validator sv;
/**
* Constructor for SchemaValidaterTest.
* @param arg0
*/
public SchemaValidaterTest(String arg0) {
super(arg0);
}
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
// TODO Auto-generated method stub
super.setUp();
sv = Validator.newInstance("./node.xsd");
}
/*
* Test for void SchemaValidater(String)
*/
public void testSchemaValidaterString() {
Assert.assertTrue(sv.validate("./node.xml"));
//Assert.assertTrue(sv.validate("./data/xformsexample.xml"));
}
public static void main(String[] args){
Validator sv = Validator.newInstance("./node.xsd");
sv.validate("./node.xml");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -