OSDN Git Service

Fix NetworkNotificationManagerTest
authorHugo Benichi <hugobenichi@google.com>
Thu, 23 Mar 2017 03:32:27 +0000 (12:32 +0900)
committerHugo Benichi <hugobenichi@google.com>
Thu, 23 Mar 2017 03:32:27 +0000 (12:32 +0900)
commitf8b804be5aeb5d0a36ff88649d7c5ecdc47c3ad1
tree309e578e0f837368281e3ce8ec5e4ac503af9492
parentb096e588116bea15b1e0ad889cd69bbc78c4cb0f
Fix NetworkNotificationManagerTest

The testNotificationsShownAndCleared test was not doing anything
because the list of notification to show was always empty.

This patch fixes this issue and actually makes the test loop on
non-empty collections, and also fixes another ordering issue in
assertions themselves, hidden until now by the first issue.

Test: runtest -x frameworks/base/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java
Change-Id: I4837b1175d7c9133e9156e33acaa1e7e3341cc62
tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java