import hiro.yoshioka.ast.sql.RowColumn;
import hiro.yoshioka.ast.sql.util.ASTAssist;
import hiro.yoshioka.ast.sql.util.ASTProposalableAssist;
import hiro.yoshioka.sql.resource.IDBResource;

public class TestAssistFromTester extends TestAbsAssistTester {

	// public void testFrom00() {
	// read(new File("test/input/testFrom00.txt"));
	//  
	// fUtil.setRowColumn(new RowColumn(5, 4));
	// ASTProposalableAssist assist = fUtil.getASTProposalableAssist();
	// System.out.println(assist);
	// System.out.println("----------------------------------------");
	// assertEquals("アシストタイプはテーブル？",ASTAssist.ASSIST_TABLE, assist.getType());
	// IDBResource[] proposals = assist.proposalDBResources();
	// assertTrue("候補があるべき",proposals.length>0);
	// }
	// public void testFrom01() {
	// read(new File("test/input/testFrom01.txt"));
	//  
	// fUtil.setRowColumn(new RowColumn(4,11));
	// ASTProposalableAssist assist = fUtil.getASTProposalableAssist();
	// System.out.println(assist);
	// System.out.println("----------------------------------------");
	// assertEquals("アシストタイプはテーブル？",ASTAssist.ASSIST_TABLE, assist.getType());
	// IDBResource[] proposals = assist.proposalDBResources();
	// assertTrue("候補があるべき",proposals.length>0);
	// }
	public void testFrom01() {
		read("testFrom01.txt");

		fUtil.setRowColumn(new RowColumn(5, 17));
		ASTProposalableAssist assist = fUtil.getASTProposalableAssist();
		System.out.println(assist);
		System.out.println("----------------------------------------");
		assertEquals("アシストタイプはテーブル？", ASTAssist.ASSIST_TABLE, assist.getType());
		IDBResource[] proposals = assist.proposalDBResources();
		assertTrue("候補があるべき", proposals.length > 0);
		for (int i = 0; i < proposals.length; i++) {
			System.out.println("[" + i + "]=" + proposals[i].getName() + "/"
					+ proposals[i].getParent());
		}
	}

	public void testFrom02() {
		read("testFrom02.txt");

		fUtil.setRowColumn(new RowColumn(5, 12));
		ASTProposalableAssist assist = fUtil.getASTProposalableAssist();
		System.out.println(assist);
		System.out.println("----------------------------------------");
		assertEquals("アシストタイプはテーブル？", ASTAssist.ASSIST_TABLE, assist.getType());
		IDBResource[] proposals = assist.proposalDBResources();
		assertTrue("候補があるべき", proposals.length > 0);
		for (int i = 0; i < proposals.length; i++) {
			System.out.println("[" + i + "]=" + proposals[i].getName() + "/"
					+ proposals[i].getParent());
		}
	}
}