package ModelTest;

import java.util.Date;

import javax.xml.bind.JAXBException;

import org.bench4q.share.helper.MarshalHelper;
import org.bench4q.share.models.master.statistics.ScriptBehaviorsBriefModel;
import org.bench4q.share.models.master.statistics.ScriptBriefResultModel;
import org.bench4q.share.models.master.statistics.ScriptPageBriefModel;
import org.junit.Test;

import static org.junit.Assert.*;

public class Test_StatisticsResultModel {
	@Test
	public void testScriptBrief() throws JAXBException {
		ScriptBriefResultModel scriptBriefResultModel = new ScriptBriefResultModel();
		scriptBriefResultModel.setSamplingTime(new Date());
		System.out.println(MarshalHelper.marshal(ScriptBriefResultModel.class,
				scriptBriefResultModel));
		assertNotNull(scriptBriefResultModel.getSamplingTime());
	}

	@Test
	public void testBehaviorsBrief() throws JAXBException {
		ScriptBehaviorsBriefModel scriptBehaviorsBriefModel = new ScriptBehaviorsBriefModel();
		scriptBehaviorsBriefModel.setSamplingTime(new Date());
		System.out.println(MarshalHelper.marshal(
				ScriptBehaviorsBriefModel.class, scriptBehaviorsBriefModel));
		assertNotNull(scriptBehaviorsBriefModel.getSamplingTime());
	}

	@Test
	public void testPageBrief() throws JAXBException {
		ScriptPageBriefModel pageBriefModel = new ScriptPageBriefModel();
		pageBriefModel.setSamplingTime(new Date());
		System.out.println(MarshalHelper.marshal(ScriptPageBriefModel.class,
				pageBriefModel));
		assertNotNull(pageBriefModel.getSamplingTime());
	}
}
