コード例 #1
0
 // 4. Private segment belonging to the authenticated user
 @Test
 public void testGetSegment_privateWithoutViewPrivate() throws Exception {
   RateLimitedTestRunner.run(
       () -> {
         final StravaSegment segment = strava().getSegment(TestUtils.SEGMENT_PRIVATE_ID);
         assertNotNull(segment);
         StravaSegmentTest.validateSegment(
             segment, TestUtils.SEGMENT_PRIVATE_ID, StravaResourceState.PRIVATE);
       });
 }
コード例 #2
0
 // 3. Private segment belonging to another user
 @Test
 public void testGetSegment_otherUserPrivateSegment() throws Exception {
   RateLimitedTestRunner.run(
       () -> {
         final StravaSegment segment =
             strava().getSegment(TestUtils.SEGMENT_OTHER_USER_PRIVATE_ID);
         StravaSegmentTest.validateSegment(
             segment, TestUtils.SEGMENT_OTHER_USER_PRIVATE_ID, StravaResourceState.PRIVATE);
       });
 }
コード例 #3
0
 @Test
 public void testGetSegment_privateWithViewPrivate() throws Exception {
   RateLimitedTestRunner.run(
       () -> {
         final StravaSegment segment =
             stravaWithViewPrivate().getSegment(TestUtils.SEGMENT_PRIVATE_ID);
         assertNotNull(segment);
         assertEquals(Boolean.TRUE, segment.getPrivateSegment());
         StravaSegmentTest.validateSegment(
             segment, TestUtils.SEGMENT_PRIVATE_ID, StravaResourceState.DETAILED);
       });
 }