package fr.inria.jessy.benchmark.tpcc;


import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import fr.inria.jessy.LocalJessy;
import fr.inria.jessy.store.Sample2EntityClass;
import fr.inria.jessy.store.SampleEntityClass;
import fr.inria.jessy.transaction.ExecutionHistory;
import fr.inria.jessy.transaction.SampleTransaction;
import fr.inria.jessy.transaction.ExecutionHistory.TransactionState;


/**
 * @author WANG Haiyun & ZHAO Guang
 * 
 */
public class TpccTestInsertData {

	LocalJessy jessy;
	InsertData id;
	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		jessy=LocalJessy.getInstance();
		
		id=new InsertData(jessy);
	}

	/**
	 * Test method for {@link fr.inria.jessy.BenchmarkTpcc.InsertData}.
	 */
	@Test
	public void testInsertData() {
		ExecutionHistory result=id.execute();
		assertEquals("Result", TransactionState.COMMITTED, result.getTransactionState());
		
		
	}


}

@@ -147,17 +147,16 @@
 t.Test;%0A
-%0A
 import f
@@ -207,79 +207,93 @@
 ssy.
-store.Sample2EntityClass;%0Aimport fr.inria.jessy.store.SampleEntityClass
+benchmark.tpcc.entities.*;%0Aimport fr.inria.jessy.Jessy;%0Aimport fr.inria.jessy.store.*
 ;%0Aim
@@ -324,32 +324,17 @@
 saction.
-ExecutionHistory
+*
 ;%0Aimport
@@ -365,25 +365,24 @@
 ion.
-SampleTransaction
+ExecutionHistory
 ;%0Aim
@@ -568,16 +568,71 @@
 ata id;%0A
+%09Warehouse wh;%0A%09District di;%0A%09Item it;%0A%09Customer cu;%0A%09%0A
 %09/**%0A%09 *
@@ -897,16 +897,108 @@
 jessy);%0A
+%09%09wh = new Warehouse();%0A%09%09di = new District();%0A%09%09it = new Item();%0A%09%09cu = new Customer();%0A%09%09%0A
 %09%7D%0A%0A%09/**
@@ -1151,16 +1151,37 @@
 cute();%0A
+%09%09/*test execution*/%0A
 %09%09assert
@@ -1257,20 +1257,16 @@
 te());%0A%09
-%09%0A%09%09
 %0A%09%7D%0A%0A%0A%7D%0A

add test class