Before using Spring Boot, I would define a main method inside the class where I want to test some methods and eventually delete if for the final version. Here is what I do:
public class UserDAO {
public int getUserSSN( int userId )
{
//Connect to database and get stuff and return it
}
public static void main(String[] args)
{
int x = new UserDAO().getUserSSN( 12 );
System.out.println( x );
}
}
This allowed me to quickly test stuff as I develop(as opposed to mocking stuff with JUnit). How can I do the same thing in Spring Boot ?
EDIT: This is not a best practice question - I think it is generally accepted that JUnits and other unit testing/mocking frameworks are necessary ensure good developer-level testing. I just want to know how to do this quickly(as in less typing - not speed of execution).