File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
ndk/lib/src/androidTest/java/io/sentry/ndk Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import static org .junit .Assert .assertEquals ;
4
4
import static org .junit .Assert .assertNotNull ;
5
+ import static org .junit .Assert .assertTrue ;
5
6
6
7
import androidx .test .ext .junit .runners .AndroidJUnit4 ;
7
8
import io .sentry .ndk .sample .NdkSample ;
8
9
import java .io .File ;
9
10
import java .io .IOException ;
11
+ import java .nio .charset .StandardCharsets ;
12
+ import java .nio .file .Files ;
10
13
import org .junit .Test ;
11
14
import org .junit .rules .TemporaryFolder ;
12
15
import org .junit .runner .RunWith ;
@@ -92,7 +95,9 @@ public void transactionSampled() throws IOException {
92
95
File [] files = outboxPath .listFiles ();
93
96
assertNotNull (files );
94
97
assertEquals (1 , files .length );
95
- // TODO check file contents and if it contains "type":"transaction"
98
+ File firstFile = files [0 ];
99
+ String content = new String (Files .readAllBytes (firstFile .toPath ()), StandardCharsets .UTF_8 );
100
+ assertTrue (content .contains ("\" type\" :\" transaction\" " ));
96
101
}
97
102
98
103
@ Test
You can’t perform that action at this time.
0 commit comments