I coded a test for a method in my service. mvn test command can't find any tests.
Service is under
src/main/java/com/nexus/dynamo
So I put the test file in:
src/test/java/com/nexus/dynamo
Still no chance. What am I missing?
@SpringBootTest
public class DynamoDBTests {
@Autowired
DynamoService dynamoService;
@Test
public void testConvertIntoDTOList() {
List<String> tableNames = Arrays.asList("Table1", "Table2", "Table3");
List<DynamoDTO> result = dynamoService.convertIntoDTOList(tableNames);
Assertions.assertEquals(tableNames.size(), result.size());
for (int i = 0; i < tableNames.size(); i++) {
String expectedName = tableNames.get(i);
DynamoDTO actualDTO = result.get(i);
Assertions.assertEquals(expectedName, actualDTO.getName());
}
}
}