@Test public void testIsAndroidMessage() { WhatsNewItemModel item = new WhatsNewItemModel(); item.setPlatforms(Arrays.asList("android")); assertThat(item.isAndroidMessage()).isTrue(); item.setPlatforms(Arrays.asList("android", "ios")); assertThat(item.isAndroidMessage()).isTrue(); item.setPlatforms(Arrays.asList("ios", "andro1d")); assertThat(item.isAndroidMessage()).isFalse(); item.setPlatforms(Arrays.asList("ios")); assertThat(item.isAndroidMessage()).isFalse(); }
public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.trim().equalsIgnoreCase(Platform.ANDROID.key)) { return true; } } return false; }
WhatsNewItemModel implements Parcelable { public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.trim().equalsIgnoreCase(Platform.ANDROID.key)) { return true; } } return false; } }
WhatsNewItemModel implements Parcelable { public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.trim().equalsIgnoreCase(Platform.ANDROID.key)) { return true; } } return false; } WhatsNewItemModel(); protected  WhatsNewItemModel(Parcel in); }
WhatsNewItemModel implements Parcelable { public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.trim().equalsIgnoreCase(Platform.ANDROID.key)) { return true; } } return false; } WhatsNewItemModel(); protected  WhatsNewItemModel(Parcel in); @NonNull String getTitle(); @NonNull String getMessage(); @NonNull String getImage(); @NonNull List<String> getPlatforms(); void setPlatforms(@NonNull List<String> platforms); boolean isAndroidMessage(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); }
WhatsNewItemModel implements Parcelable { public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.trim().equalsIgnoreCase(Platform.ANDROID.key)) { return true; } } return false; } WhatsNewItemModel(); protected  WhatsNewItemModel(Parcel in); @NonNull String getTitle(); @NonNull String getMessage(); @NonNull String getImage(); @NonNull List<String> getPlatforms(); void setPlatforms(@NonNull List<String> platforms); boolean isAndroidMessage(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); static final Creator<WhatsNewItemModel> CREATOR; }