Skip to content

Commit

Permalink
test: update test code to use getAutoCaptureSessions rather than depr…
Browse files Browse the repository at this point in the history
…ecated shouldAutoCaptureSession
  • Loading branch information
fractalwrench committed Dec 11, 2018
1 parent c6034f3 commit 3859271
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void testSetReleaseStage() throws Exception {
@Test
public void testSetAutoCaptureSessions() throws Exception {
client.setAutoCaptureSessions(true);
assertEquals(true, config.shouldAutoCaptureSessions());
assertEquals(true, config.getAutoCaptureSessions());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void testFullManifestConfig() {
assertEquals(false, protoConfig.getSendThreads());
assertEquals(false, protoConfig.getEnableExceptionHandler());
assertEquals(true, protoConfig.getPersistUserBetweenSessions());
assertEquals(true, protoConfig.shouldAutoCaptureSessions());
assertEquals(true, protoConfig.getAutoCaptureSessions());
}

@SuppressWarnings("deprecation") // test backwards compatibility of client.setMaxBreadcrumbs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ public void testEmptyNotifyEndpoint() {
public void testInvalidSessionEndpoint() {
//noinspection ConstantConditions
config.setEndpoints("http://example.com", null);
assertFalse(config.shouldAutoCaptureSessions());
assertFalse(config.getAutoCaptureSessions());
assertNull(config.getSessionEndpoint());

config.setEndpoints("http://example.com", "");
assertFalse(config.shouldAutoCaptureSessions());
assertFalse(config.getAutoCaptureSessions());
assertNull(config.getSessionEndpoint());

config.setEndpoints("http://example.com", "http://sessions.example.com");
assertFalse(config.shouldAutoCaptureSessions());
assertFalse(config.getAutoCaptureSessions());
assertEquals("http://sessions.example.com", config.getSessionEndpoint());
}

@Test
public void testAutoCaptureOverride() {
config.setAutoCaptureSessions(false);
config.setEndpoints("http://example.com", "http://example.com");
assertFalse(config.shouldAutoCaptureSessions());
assertFalse(config.getAutoCaptureSessions());
}

@SuppressWarnings("deprecation")
Expand Down Expand Up @@ -163,9 +163,9 @@ public void testLaunchThreshold() throws Exception {

@Test
public void testAutoCaptureSessions() throws Exception {
assertTrue(config.shouldAutoCaptureSessions());
assertTrue(config.getAutoCaptureSessions());
config.setAutoCaptureSessions(false);
assertFalse(config.shouldAutoCaptureSessions());
assertFalse(config.getAutoCaptureSessions());
}

@Test
Expand Down

0 comments on commit 3859271

Please sign in to comment.