Skip to content

Commit

Permalink
Update custom properties tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MatkovIvan committed Oct 5, 2018
1 parent 8032f99 commit f44adbd
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,26 @@ public void setNumber() {
verifyStatic(times(1));
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString());


/* Invalid values. */
properties.set(key, Double.NaN);
assertEquals(0, properties.getProperties().size());
verifyStatic(times(2));
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString());
properties.set(key, Double.POSITIVE_INFINITY);
assertEquals(0, properties.getProperties().size());
verifyStatic(times(3));
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString());
properties.set(key, Double.NEGATIVE_INFINITY);
assertEquals(0, properties.getProperties().size());
verifyStatic(times(4));
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString());

/* Normal value. */
Number normalValue = 0;
properties.set(key, normalValue);
assertEquals(1, properties.getProperties().size());
verifyStatic(times(1));
verifyStatic(times(4));
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString());
}

Expand Down

0 comments on commit f44adbd

Please sign in to comment.