CustomNamespaceAdapterTest.java revision 4d4979490e1fa374c0d7f3599fed0a9e83a579d0
1package android.databinding.testapp; 2 3import android.databinding.testapp.databinding.CustomNsAdapterBinding; 4import android.test.UiThreadTest; 5 6public 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} 29