Created
April 7, 2012 05:23
-
-
Save yamanyar/2325509 to your computer and use it in GitHub Desktop.
Parse example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.xmlbeans.XmlException; | |
import org.junit.Ignore; | |
import com.yamanyar.ish.TransactionalInfoDocument; | |
import java.io.File; | |
import java.io.IOException; | |
import static junit.framework.Assert.assertEquals; | |
/** | |
* @author Kaan Yamanyar | |
*/ | |
public class CheckGeneratedXsdDrivenBeans { | |
@Test | |
public void testReadXML() throws XmlException, IOException { | |
File f = new File("pr1.xml"); | |
TransactionalInfoDocument infoDoc = TransactionalInfoDocument.Factory.parse(f); | |
assertEquals("Expected material name not found!","TestMatABC.123",infoDoc.getTransactionalInfo() | |
.getProducts().getProductArray()[2].getMaterialName()); | |
//TODO enhance this test | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment