package test.query;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.snaker.SnakerFlowyApplication;
import org.snaker.engine.access.Page;
import org.snaker.engine.access.QueryFilter;
import org.snaker.engine.entity.HistoryOrder;
import org.snaker.engine.test.TestSnakerBase;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import test.process.TestProcess;

/**
 * 流程实例查询测试
 * @author yuqs
 * @since 1.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = { SnakerFlowyApplication.class, TestProcess.class })
public class TestQueryHistOrder extends TestSnakerBase {
	@Test
	public void test() {
		System.out.println(engine.query().getHistoryOrders(
				new QueryFilter().setCreateTimeStart("2014-01-01").setName("simple").setState(0).setProcessType("预算管理流程1")));
		System.out.println(engine.query().getHistoryOrders(new Page<HistoryOrder>(), new QueryFilter()));
	}
}
