urbanairship-core/src/test/java/com/urbanairship/analytics/CustomEventTest.java
@Test
    public void testPropertiesExceedsMaxCount() throws JSONException {
        CustomEvent.Builder eventBuilder = CustomEvent.newBuilder("event name");

        // Add the max number of events
        for (int i = 0; i < CustomEvent.MAX_PROPERTIES; i++) {
            eventBuilder.addProperty(UUID.randomUUID().toString(), "some value");
        }

        // Verify its still valid
        assertTrue(eventBuilder.build().isValid());

        // Add another event
        eventBuilder.addProperty(UUID.randomUUID().toString(), "some value");

        // Verify its now invalid
        assertFalse(eventBuilder.build().isValid());
    }
/**
     * Test adding more than {@link CustomEvent#MAX_PROPERTIES} properties invalidates the event.
     */
Test adding more than  CustomEvent#MAX_PROPERTIES properties invalidates the event.
Test adding more than CustomEvent#MAX_PROPERTIES properties invalidates the event .
@Test
    public void testPropertiesExceedsMaxCount() throws JSONException {
        CustomEvent.Builder eventBuilder = CustomEvent.newBuilder("event name");
        for (int i = 0; i < CustomEvent.MAX_PROPERTIES; i++) {
            eventBuilder.addProperty(UUID.randomUUID().toString(), "some value");
        }
        assertTrue(eventBuilder.build().isValid());
        eventBuilder.addProperty(UUID.randomUUID().toString(), "some value");
        assertFalse(eventBuilder.build().isValid());
    }
@ Test public void testPropertiesExceedsMaxCount ( ) throws JSONException { CustomEvent . Builder eventBuilder = CustomEvent . newBuilder ( "event name" ) ; for ( int i = 0 ; i < CustomEvent . MAX_PROPERTIES ; i ++ ) { eventBuilder . addProperty ( UUID . randomUUID ( ) . toString ( ) , "some value" ) ; } assertTrue ( eventBuilder . build ( ) . isValid ( ) ) ; eventBuilder . addProperty ( UUID . randomUUID ( ) . toString ( ) , "some value" ) ; assertFalse ( eventBuilder . build ( ) . isValid ( ) ) ; }
Test adding more than {@link CustomEvent#MAX_PROPERTIES} properties invalidates the event.
Test adding more than { @link CustomEvent#MAX_PROPERTIES } properties invalidates the event .
// Add the max number of events // Verify its still valid // Add another event // Verify its now invalid