Skip to content

Commit 32b7962

Browse files
committed
renaming in widget logic update test
1 parent 3b95eb1 commit 32b7962

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

widget-helper/src/androidTest/java/heyalex/widgethelper/test/update_logic/WidgetUpdateServiceTest.kt

+3-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class WidgetUpdateServiceTest {
2424

2525
@Test
2626
fun newInstanceOfWidgetUpdate() {
27-
newInstanceWidgetupdate()
27+
newInstanceOfBuilder()
2828
assertTrue(true)
2929
}
3030

@@ -46,19 +46,14 @@ class WidgetUpdateServiceTest {
4646
"annotation @RemoteViewsUpdater")
4747
}
4848

49-
private fun newInstanceWidgetupdate() {
49+
private fun newInstanceOfBuilder() {
5050
var clazz: Class<*>? = null
5151
try {
5252
clazz = Class.forName(ComponentName(rule.activity.applicationContext,
5353
AppWidgetUpdateTest::class.java.name).className)
5454
val annotation = findAnnotation(clazz)
5555
val builder = (annotation as RemoteViewsUpdater).value.objectInstance
56-
if (builder != null) {
57-
builder.update(rule.activity.applicationContext, null, 0)
58-
} else {
59-
//LogWrapper.w(LOG_TAG, "cannot update widgets, no builder set for given " + "EXTRA_PROVIDER")
60-
}
61-
56+
builder?.update(rule.activity.applicationContext, null, 0)
6257
} catch (e: ClassNotFoundException) {
6358
throw InstantiationException("Unable to instantiate WidgetBuilder " +
6459
clazz!!.name + ": make sure class name exists, is public, and has an"

0 commit comments

Comments
 (0)