Search in sources :

Example 1 with MyService

use of com.stackify.services.MyService in project tutorials by eugenp.

the class MyServiceTest method testService.

@Test
public void testService() {
    MyService myService = new MyService();
    User user = new User("John", "john@yahoo.com");
    user.setDateOfBirth(LocalDate.of(1980, Month.APRIL, 20));
    logger.info("Age of user {} is {}", () -> user.getName(), () -> myService.calculateUserAge(user));
}
Also used : User(com.stackify.models.User) MyService(com.stackify.services.MyService) Test(org.junit.Test)

Aggregations

User (com.stackify.models.User)1 MyService (com.stackify.services.MyService)1 Test (org.junit.Test)1