public void testRaw() {
   try {
     NativeResources.openRawResource(SAMPLE_RAW_NAME).close();
     NativeResources.openRawResource(SAMPLE_RAW_NAME, new TypedValue()).close();
     NativeResources.openRawResourceFd(SAMPLE_RAW_NAME).close();
   } catch (IOException e) {
     fail("Something went wrong dealing with the raw streams.");
   }
 }
 public void testFraction() {
   NativeResources.getFraction(SAMPLE_FRACTION_NAME);
 }
 public void testDimension() {
   NativeResources.getDimension(SAMPLE_DIMENSION_NAME);
   NativeResources.getDimensionPixelOffset(SAMPLE_DIMENSION_NAME);
   NativeResources.getDimensionPixelSize(SAMPLE_DIMENSION_NAME);
 }
 public void testInteger() {
   NativeResources.getIdentifier(SAMPLE_INTEGER_NAME);
 }
 public void testBoolean() {
   NativeResources.getBoolean(SAMPLE_BOOLEAN_NAME);
 }
 public void testColorStateList() {
   ColorStateList color = NativeResources.getColorStateList(SAMPLE_COLOR_STATE_LIST_NAME);
   assertNotNull(color);
 }
 public void testColor() {
   NativeResources.getColor(SAMPLE_COLOR_NAME);
 }
 public void testDrawable() {
   Drawable drawable = NativeResources.getDrawable(SAMPLE_DRAWABLE_NAME);
   assertNotNull(drawable);
 }
 public void testString() {
   String string = NativeResources.getString(SAMPLE_STRING_NAME);
   assertNotNull(string);
   String stringWithArgs = NativeResources.getString(SAMPLE_STRING_NAME, new Object[] {});
   assertNotNull(stringWithArgs);
 }
 public void testIdentifierAccess() {
   assertTrue(NativeResources.getIdentifier(SAMPLE_ID_NAME) != 0);
   assertTrue(NativeResources.getStringIdentifier(SAMPLE_STRING_NAME) != 0);
   assertTrue(NativeResources.getDrawableIdentifier(SAMPLE_DRAWABLE_NAME) != 0);
   assertTrue(NativeResources.getColorIdentifier(SAMPLE_COLOR_NAME) != 0);
   assertTrue(NativeResources.getColorIdentifier(SAMPLE_COLOR_STATE_LIST_NAME) != 0);
   assertTrue(NativeResources.getBooleanIdentifier(SAMPLE_BOOLEAN_NAME) != 0);
   assertTrue(NativeResources.getIntegerIdentifier(SAMPLE_INTEGER_NAME) != 0);
   assertTrue(NativeResources.getAnimIdentifier(SAMPLE_ANIM_NAME) != 0);
   assertTrue(NativeResources.getAnimatorIdentifier(SAMPLE_ANIMATOR_NAME) != 0);
   assertTrue(NativeResources.getDimensionIdentifier(SAMPLE_DIMENSION_NAME) != 0);
   assertTrue(NativeResources.getFractionIdentifier(SAMPLE_FRACTION_NAME) != 0);
   assertTrue(NativeResources.getArrayIdentifier(SAMPLE_STRING_ARRAY_NAME) != 0);
   assertTrue(NativeResources.getArrayIdentifier(SAMPLE_TYPED_ARRAY_NAME) != 0);
   assertTrue(NativeResources.getLayoutIdentifier(SAMPLE_LAYOUT_NAME) != 0);
   assertTrue(NativeResources.getPluralsIdentifier(SAMPLE_PLURALS_NAME) != 0);
   assertTrue(NativeResources.getXmlIdentifier(SAMPLE_XML_NAME) != 0);
   assertTrue(NativeResources.getRawIdentifier(SAMPLE_RAW_NAME) != 0);
   assertTrue(NativeResources.getAttrIdentifier(SAMPLE_ATTR_NAME) != 0);
   assertTrue(NativeResources.getInterpolatorIdentifier(SAMPLE_INTERPOLATOR_NAME) != 0);
   assertTrue(NativeResources.getMenuIdentifier(SAMPLE_MENU_NAME) != 0);
   assertTrue(NativeResources.getMipmapIdentifier(SAMPLE_MIPMAP_NAME) != 0);
   assertTrue(NativeResources.getStyleIdentifier(SAMPLE_STYLE_NAME) != 0);
 }
 public void testXml() {
   NativeResources.getXml(SAMPLE_XML_NAME);
 }
 public void testText() {
   NativeResources.getText(SAMPLE_STRING_NAME);
   CharSequence def = "Default";
   CharSequence result = NativeResources.getText("", def);
   assertEquals(result, def);
 }
 public void testPlurals() {
   assertNotNull(NativeResources.getQuantityString(SAMPLE_PLURALS_NAME, 0));
   assertNotNull(NativeResources.getQuantityString(SAMPLE_PLURALS_NAME, 0, new Object[] {0}));
   assertNotNull(NativeResources.getQuantityText(SAMPLE_PLURALS_NAME, 0));
 }
 public void testLayout() {
   NativeResources.getLayout(SAMPLE_LAYOUT_NAME);
 }
 public void testArray() {
   NativeResources.getStringArray(SAMPLE_STRING_ARRAY_NAME);
   NativeResources.getTextArray(SAMPLE_STRING_ARRAY_NAME);
   NativeResources.getTypedArray(SAMPLE_TYPED_ARRAY_NAME);
 }