car/src/androidTest/java/androidx/car/navigation/utils/BundleMarshallerTest.java
@Test
    public void listSerialization_listOfSizeN() {
        TestBundlable value = new TestBundlable().setListValue(Arrays.asList(
                new TestBundlable().setInt(1),
                new TestBundlable().setInt(2),
                new TestBundlable().setInt(3)));
        Bundle data = mBundleMarshaller.getBundle();
        value.toBundle(mBundleMarshaller);
        assertEquals(3, data.getInt("bundlableListValue._size"));
        assertEquals(1, data.getInt("bundlableListValue.0.intValue"));
        assertEquals(2, data.getInt("bundlableListValue.1.intValue"));
        assertEquals(3, data.getInt("bundlableListValue.2.intValue"));
    }
/**
     * Tests the correct serialization of a list of size n.
     */
Tests the correct serialization of a list of size n.
Tests the correct serialization of a list of size n .
@Test
    public void listSerialization_listOfSizeN() {
        TestBundlable value = new TestBundlable().setListValue(Arrays.asList(
                new TestBundlable().setInt(1),
                new TestBundlable().setInt(2),
                new TestBundlable().setInt(3)));
        Bundle data = mBundleMarshaller.getBundle();
        value.toBundle(mBundleMarshaller);
        assertEquals(3, data.getInt("bundlableListValue._size"));
        assertEquals(1, data.getInt("bundlableListValue.0.intValue"));
        assertEquals(2, data.getInt("bundlableListValue.1.intValue"));
        assertEquals(3, data.getInt("bundlableListValue.2.intValue"));
    }
@ Test public void listSerialization_listOfSizeN ( ) { TestBundlable value = new TestBundlable ( ) . setListValue ( Arrays . asList ( new TestBundlable ( ) . setInt ( 1 ) , new TestBundlable ( ) . setInt ( 2 ) , new TestBundlable ( ) . setInt ( 3 ) ) ) ; Bundle data = mBundleMarshaller . getBundle ( ) ; value . toBundle ( mBundleMarshaller ) ; assertEquals ( 3 , data . getInt ( "bundlableListValue._size" ) ) ; assertEquals ( 1 , data . getInt ( "bundlableListValue.0.intValue" ) ) ; assertEquals ( 2 , data . getInt ( "bundlableListValue.1.intValue" ) ) ; assertEquals ( 3 , data . getInt ( "bundlableListValue.2.intValue" ) ) ; }
Tests the correct serialization of a list of size n.
Tests the correct serialization of a list of size n .