Skip to content

Commit c6df8f0

Browse files
committed
Format code
1 parent b8c0a32 commit c6df8f0

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

sentry-async-profiler/src/test/java/io/sentry/asyncprofiler/provider/AsyncProfilerContinuousProfilerProviderTest.kt

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,44 @@ import io.sentry.ILogger
44
import io.sentry.ISentryExecutorService
55
import io.sentry.NoOpContinuousProfiler
66
import io.sentry.asyncprofiler.profiling.JavaContinuousProfiler
7-
import one.profiler.AsyncProfiler
8-
import org.mockito.Mockito.mock
9-
import org.mockito.Mockito.mockStatic
107
import kotlin.test.Test
118
import kotlin.test.assertSame
129
import kotlin.test.assertTrue
13-
10+
import one.profiler.AsyncProfiler
11+
import org.mockito.Mockito.mock
12+
import org.mockito.Mockito.mockStatic
1413

1514
class AsyncProfilerContinuousProfilerProviderTest {
1615

1716
@Test
1817
fun `provider returns JavaAsyncProfiler if AsyncProfiler can be loaded`() {
19-
val profiler = AsyncProfilerContinuousProfilerProvider().getContinuousProfiler(
20-
mock(ILogger::class.java),
21-
"",
22-
10,
23-
mock(ISentryExecutorService::class.java)
24-
)
18+
val profiler =
19+
AsyncProfilerContinuousProfilerProvider()
20+
.getContinuousProfiler(
21+
mock(ILogger::class.java),
22+
"",
23+
10,
24+
mock(ISentryExecutorService::class.java),
25+
)
2526

2627
assertTrue(profiler is JavaContinuousProfiler)
2728
}
2829

2930
@Test
3031
fun `provider return NoopProfiler if AsyncProfiler cannot be loaded`() {
31-
mockStatic(AsyncProfiler::class.java).use {
32+
mockStatic(AsyncProfiler::class.java).use {
3233
it.`when`<Any> { AsyncProfiler.getInstance() }.thenReturn(null)
3334

34-
val profiler = AsyncProfilerContinuousProfilerProvider().getContinuousProfiler(
35-
mock(ILogger::class.java),
36-
"",
37-
10,
38-
mock(ISentryExecutorService::class.java)
39-
)
35+
val profiler =
36+
AsyncProfilerContinuousProfilerProvider()
37+
.getContinuousProfiler(
38+
mock(ILogger::class.java),
39+
"",
40+
10,
41+
mock(ISentryExecutorService::class.java),
42+
)
4043

41-
assertSame(NoOpContinuousProfiler.getInstance(), profiler)
44+
assertSame(NoOpContinuousProfiler.getInstance(), profiler)
4245
}
4346
}
4447
}

0 commit comments

Comments
 (0)