Get activity title from uploaded file, if it is present (#7)
* Use activity title from GPX file when present * Extend test * Test shortening of long names * Extract constant --------- Co-authored-by: Niklas Deutschmann <sonstharmlos@noreply.codeberg.org>
This commit is contained in:
parent
6afd7a5dad
commit
03b8e6d315
5 changed files with 56 additions and 15 deletions
|
|
@ -112,6 +112,10 @@ class GpxParserIntegrationTest {
|
|||
|
||||
// Verify at least some basic data
|
||||
assertNotNull(parsedData.getActivityType(), "Activity type should be determined");
|
||||
String parsedTitle = parsedData.getTitle();
|
||||
assertEquals(255, parsedTitle.length());
|
||||
assertTrue(parsedTitle.startsWith("Einmal Frust loswerden"));
|
||||
assertFalse(parsedTitle.contains("Shouldn't appear"));
|
||||
assertEquals(Activity.ActivityType.RUN, parsedData.getActivityType(),
|
||||
"Activity type should be RUN (from GPX <type>running</type>)");
|
||||
assertTrue(parsedData.getTrackPoints().size() > 0, "Should have at least one track point");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue