### Question:
WXUtils { public static int getInt(Object value) { return getInteger(value, 0); }  static boolean isUiThread(); static boolean isUndefined(float value); static float getFloatByViewport(Object value, int viewport); static float getFloat(Object value); static Float getFloat(Object value, @Nullable Float df); static float fastGetFloat(String raw, int precision); static float fastGetFloat(String raw); static int getInt(Object value); static Integer getInteger(@Nullable Object value, @Nullable Integer df); @Deprecated static long getLong(Object value); @Deprecated static double getDouble(Object value); static boolean isTabletDevice(); static Boolean getBoolean(@Nullable Object value, @Nullable Boolean df); static long getAvailMemory(Context context); static String getString(@Nullable Object value,@Nullable String df); static int parseUnitOrPercent(String raw, int unit); static String getBundleBanner(String content); static int getNumberInt(Object value, int defaultValue); static final char PERCENT; }### Answer:
@Test public void testGetInt() throws Exception { int test_int = WXUtils.getInt("23px"); assertEquals(23, test_int); }
@Test public void testGetIntWX() throws Exception { Integer test_int = WXUtils.getInt("100wx"); Integer want = (int)(100 * TEST_DENSITY * 750 / TEST_SCREEN_WIDTH); assertEquals(test_int, want); test_int = WXUtils.getInt("100px"); want = 100; assertEquals(test_int, want); test_int = WXUtils.getInt("100"); want = 100; assertEquals(test_int, want); test_int = WXUtils.getInt(100); want = 100; assertEquals(test_int, want); test_int = WXUtils.getInt(100.1); want = 0; assertEquals(test_int, want); }