| 1 |
package android.databinding.testapp; |
| 2 |
|
| 3 |
import android.databinding.testapp.databinding.CustomNsAdapterBinding; |
| 4 |
import android.test.UiThreadTest; |
| 5 |
|
| 6 |
public class CustomNamespaceAdapterTest extends BaseDataBinderTest<CustomNsAdapterBinding>{ |
| 7 |
public CustomNamespaceAdapterTest() { |
| 8 |
super(CustomNsAdapterBinding.class); |
| 9 |
} |
| 10 |
|
| 11 |
@UiThreadTest |
| 12 |
public void testAndroidNs() { |
| 13 |
initBinder(); |
| 14 |
mBinder.setStr1("a"); |
| 15 |
mBinder.setStr2("b"); |
| 16 |
mBinder.executePendingBindings(); |
| 17 |
assertEquals("a", mBinder.textView1.getText().toString()); |
| 18 |
} |
| 19 |
|
| 20 |
@UiThreadTest |
| 21 |
public void testCustomNs() { |
| 22 |
initBinder(); |
| 23 |
mBinder.setStr1("a"); |
| 24 |
mBinder.setStr2("b"); |
| 25 |
mBinder.executePendingBindings(); |
| 26 |
assertEquals("b", mBinder.textView2.getText().toString()); |
| 27 |
} |
| 28 |
} |