I have a spring boot application with main class like below:
@SpringBootApplication
public class Application {
public static void main(String[] args) throws
Something like that:
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class ApplicationTest{
@Autowired
Foo foo; //whatever you are testing
@Test
public void FooTest() throws Exception{
Foo f = foo.getFooById("22");
assertEquals("9B", f.getCode);
}
//TODO look into MockMVC for testing services
}