File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
core-api/src/test/java/com/optimizely/ab Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,21 @@ public void withClientInfo() throws Exception {
219219 assertEquals (argument .getValue ().getEventBatch ().getClientName (), "java-sdk" );
220220 assertEquals (argument .getValue ().getEventBatch ().getClientVersion (), BuildVersionInfo .getClientVersion ());
221221
222+ // invalid override with null inputs
223+
224+ reset (eventHandler );
225+ optimizely = Optimizely .builder (validConfigJsonV4 (), eventHandler )
226+ .withClientInfo (null , null )
227+ .build ();
228+ optimizely .track ("basic_event" , "tester" );
229+
230+ verify (eventHandler , timeout (5000 )).dispatchEvent (argument .capture ());
231+ assertEquals (argument .getValue ().getEventBatch ().getClientName (), "java-sdk" );
232+ assertEquals (argument .getValue ().getEventBatch ().getClientVersion (), BuildVersionInfo .getClientVersion ());
233+
222234 // override client-engine info
223235
224- eventHandler = mock ( EventHandler . class );
236+ reset ( eventHandler );
225237 optimizely = Optimizely .builder (validConfigJsonV4 (), eventHandler )
226238 .withClientInfo (EventBatch .ClientEngine .ANDROID_SDK , "1.2.3" )
227239 .build ();
You can’t perform that action at this time.
0 commit comments