sdk/src/androidTest/java/com/bugsnag/android/SessionTrackingPayloadTest.java
@Test
    public void testMultipleSessionFiles() throws Exception {
        sessionStore.write(session);
        sessionStore.write(generateSession());
        List<File> storedFiles = sessionStore.findStoredFiles();

        SessionTrackingPayload payload = new SessionTrackingPayload(null,
            storedFiles, appData, deviceData);
        rootNode = streamableToJson(payload);

        assertNotNull(rootNode);
        JSONArray sessions = rootNode.getJSONArray("sessions");
        assertNotNull(sessions);
        assertEquals(2, sessions.length());
    }
/**
     * Serialises sessions from a file instead
     */
Serialises sessions from a file instead
Serialises sessions from a file instead
@Test
    public void testMultipleSessionFiles() throws Exception {
        sessionStore.write(session);
        sessionStore.write(generateSession());
        List<File> storedFiles = sessionStore.findStoredFiles();
        SessionTrackingPayload payload = new SessionTrackingPayload(null,
            storedFiles, appData, deviceData);
        rootNode = streamableToJson(payload);
        assertNotNull(rootNode);
        JSONArray sessions = rootNode.getJSONArray("sessions");
        assertNotNull(sessions);
        assertEquals(2, sessions.length());
    }
@ Test public void testMultipleSessionFiles ( ) throws Exception { sessionStore . write ( session ) ; sessionStore . write ( generateSession ( ) ) ; List < File > storedFiles = sessionStore . findStoredFiles ( ) ; SessionTrackingPayload payload = new SessionTrackingPayload ( null , storedFiles , appData , deviceData ) ; rootNode = streamableToJson ( payload ) ; assertNotNull ( rootNode ) ; JSONArray sessions = rootNode . getJSONArray ( "sessions" ) ; assertNotNull ( sessions ) ; assertEquals ( 2 , sessions . length ( ) ) ; }
Serialises sessions from a file instead
Serialises sessions from a file instead