ParameterInsertTest added

This commit is contained in:
JanUlrich 2014-03-10 15:56:17 +01:00
parent eef38bff42
commit b29fa03782
4 changed files with 40 additions and 1 deletions

View File

@ -35,7 +35,19 @@ public class TypeInsertPoint {
return this.getTypeInsertString().length();
}
private String getTypeInsertString(){
/**
*
* @return Der Offset des TypeInsertPoints in dem geparsten Source für dessen Klasse er erstellt wurde.
*/
public int getOffset(){
return this.point.getOffset();
}
/**
* Die Zeichenkette die durch diesen TypeInsertPoint eingesetzt wird. (Der Typ als String)
* @return
*/
public String getTypeInsertString(){
String ret = type.printJavaCode(this.resultSet).toString()+" ";
return ret;
}

View File

@ -0,0 +1,13 @@
package plugindevelopment;
import org.junit.Test;
public class ParameterInsertTest {
private static final String TEST_FILE = "ParameterTypeInsertTest.jav";
private static final String SOLUTION_FILE = "ParameterTypeInsertTestSolution.jav";
@Test
public void run(){
TypeInsertTester.test(this.TEST_FILE, this.SOLUTION_FILE);
}
}

View File

@ -0,0 +1,7 @@
class VariableTypeInsertTest{
String var;
void methode(test){
var = test;
}
}

View File

@ -0,0 +1,7 @@
class VariableTypeInsertTest{
String var;
void methode(String test){
var = test;
}
}