File tree Expand file tree Collapse file tree
main/java/com/mapzen/open/core
test/java/com/mapzen/open/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868import static org .apache .http .protocol .HTTP .UTF_8 ;
6969
7070public class DataUploadService extends Service {
71- private static final int MIN_NUM_TRACKING_POINTS = 10 ;
7271 private static final int MIN_RANGE_IN_METERS = 50 ;
7372
7473 private static final String RANGE_QUERY_EXT = " from "
@@ -217,10 +216,6 @@ public DOMSource getDocument(String groupId) {
217216 }
218217 trkElement .appendChild (trksegElement );
219218 Element documentElement = document .getDocumentElement ();
220- int numberOfPoints = documentElement .getElementsByTagName ("ele" ).getLength ();
221- if (numberOfPoints < MIN_NUM_TRACKING_POINTS ) {
222- return null ;
223- }
224219 if (calculateMaxRange (groupId ) < MIN_RANGE_IN_METERS ) {
225220 return null ;
226221 }
Original file line number Diff line number Diff line change @@ -159,23 +159,6 @@ public void shouldGenerateGPX_shouldSubmit() throws Exception {
159159 eq (expectedRouteDescription ));
160160 }
161161
162- @ Test
163- public void shouldGenerateGPX_shouldNotSubmit () throws Exception {
164- Token token = new Token ("stuff" , "fun" );
165- app .setAccessToken (token );
166-
167- String expectedGroupId = "test_route" ;
168- String expectedRouteDescription = "does not matter" ;
169- fillLocationsTable (expectedGroupId , 4 );
170- DataUploadService spy = spy (service );
171- spy .onStartCommand (null , 0 , 0 );
172- verify (spy ).generateGpxXmlFor (expectedGroupId , expectedRouteDescription );
173- verify (spy ).getDocument (expectedGroupId );
174- verify (spy , never ()).submitCompressedFile (any (ByteArrayOutputStream .class ),
175- eq (expectedGroupId ),
176- eq (expectedRouteDescription ));
177- }
178-
179162 @ Test
180163 public void shouldHaveLocationsFromAllRoutesInGroup () throws Exception {
181164 String groupId = "test-group-id" ;
You can’t perform that action at this time.
0 commit comments