Am using Maven, I want to import the methods which are in test class to the main class,please let me know how to do this. Actually I have done importing the class of test to main function and created an object using the class of test, but the am getting an error like can not resolve methods.
Actually am doing unit testing , I want to import the test class(1) to the other test class(2) and in test class (2) I have to write main() and inside main() am creating the object to test class(1) and calling the required methods from test class(1) using the object created. Do I have to add any dependencies in pom.xml file of test class(2)(am using maven) or any other suggestions to do this.
Test class1.java
public class testclass1{
public void a(){
statements
}
public void a(){
statements
}
}
Testclass2.java
import testclass1;
public static void main (String args[]){
testclass1 ET =new testclass1();
ET.a();
ET.b();
}