public S hasSummaryOff(int resId) { isNotNull(); return hasSummaryOff(actual.getContext().getString(resId)); }
public S hasSummaryOff(CharSequence summary) { isNotNull(); CharSequence actualSummary = actual.getSummaryOff(); assertThat(actualSummary) // .overridingErrorMessage("Expected off summary <%s> but was <%s>.", summary, actualSummary) // .isEqualTo(summary); return myself; }
public S hasSummaryOn(CharSequence summary) { isNotNull(); CharSequence actualSummary = actual.getSummaryOn(); assertThat(actualSummary) // .overridingErrorMessage("Expected on summary <%s> but was <%s>.", summary, actualSummary) // .isEqualTo(summary); return myself; }
public S isNotChecked() { isNotNull(); assertThat(actual.isChecked()) // .overridingErrorMessage("Expected to not be checked but was.") // .isFalse(); return myself; } }
@SuppressWarnings("TryWithIdenticalCatches") @Override protected void onBindView(View view) { super.onBindView(view); View checkableView = view.findViewById(R.id.switchWidget); if (checkableView != null && checkableView instanceof Checkable) { if (checkableView instanceof SwitchCompat) { final SwitchCompat switchView = (SwitchCompat) checkableView; switchView.setOnCheckedChangeListener(null); } ((Checkable) checkableView).setChecked(isChecked()); if (checkableView instanceof SwitchCompat) { final SwitchCompat switchView = (SwitchCompat) checkableView; switchView.setTextOn(mSwitchOn); switchView.setTextOff(mSwitchOff); switchView.setOnCheckedChangeListener(mListener); } } if (sSyncSummaryViewMethod != null) { try { sSyncSummaryViewMethod.invoke(this, view); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } }
public S isChecked() { isNotNull(); assertThat(actual.isChecked()) // .overridingErrorMessage("Expected to be checked but was not.") // .isTrue(); return myself; }
public S isChecked() { isNotNull(); assertThat(actual.isChecked()) // .overridingErrorMessage("Expected to be checked but was not.") // .isTrue(); return myself; }
public S hasSummaryOn(int resId) { isNotNull(); return hasSummaryOn(actual.getContext().getString(resId)); }
public S hasSummaryOff(CharSequence summary) { isNotNull(); CharSequence actualSummary = actual.getSummaryOff(); assertThat(actualSummary) // .overridingErrorMessage("Expected off summary <%s> but was <%s>.", summary, actualSummary) // .isEqualTo(summary); return myself; }
public S hasSummaryOn(CharSequence summary) { isNotNull(); CharSequence actualSummary = actual.getSummaryOn(); assertThat(actualSummary) // .overridingErrorMessage("Expected on summary <%s> but was <%s>.", summary, actualSummary) // .isEqualTo(summary); return myself; }
public S isNotChecked() { isNotNull(); assertThat(actual.isChecked()) // .overridingErrorMessage("Expected to not be checked but was.") // .isFalse(); return myself; } }
public S hasSummaryOn(int resId) { isNotNull(); return hasSummaryOn(actual.getContext().getString(resId)); }
public S hasSummaryOff(int resId) { isNotNull(); return hasSummaryOff(actual.getContext().getString(resId)); }