I saw one of the link Can we write a program without a class in core Java?
So going through this , it looks like we cant have a java program without atleast one single class.
But we have some requirement like,
I have a test Java program like::
package dashboardName;
import org.testng.Assert;
import org.testng.annotations.Test;
import pojoclass.MpsPojo;
import mpsLogicPack.MpsLogic;
public class TestLogic {
MpsPojo mpspojon = new MpsPojo();
MpsLogic mpslogicn = new MpsLogic();
@Test
public void firstTest() {
mpspojon.setMfr("m1");
mpspojon.setProd("p1");
mpspojon.setSchema("sch1");
mpslogicn.calculateAssert(mpspojon);
System.out.println("Printing from Final class");
}
}
The name of this package is dashboardName.
So if I will write a java program which has just the import statement of dashboardName. like:
FinalTest.java
import dashboardName.TestLogic;
So if I will execute this, what should be the result. Currently this is showing no error but showing No test run.
This may be a silly question because I belong to Perl backround and switching to Java. So pls excuse me.
Thanks