package org.bench4q.agent.test.model;

import java.io.File;
import java.io.IOException;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlRootElement;

import org.bench4q.share.models.agent.scriptrecord.BehaviorModel;
import org.junit.Test;

import static org.junit.Assert.*;

@XmlRootElement(name = "modelTest")
public class ModelTest {

	@Test
	public void unmarshalVerify() throws IOException, JAXBException {
		Object object = JAXBContext
				.newInstance(BehaviorModel.class)
				.createUnmarshaller()
				.unmarshal(
						new File("Scripts"
								+ System.getProperty("file.separator")
								+ "behaviorModel.xml"));
		assertTrue(object instanceof BehaviorModel);
	}

}
