@Test public void testRenderToViewModel() { mNotification.parseMessageData(); GenericNotificationViewModel viewModel = mNotification.renderToViewModel(mContext, null); assertNotNull(viewModel); }
@Nullable @Override public GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid) { Resources r = context.getResources(); String header = getNotificationCardHeader(context, districtName, districtKey); String districtCode = EventHelper.getEventCode(districtKey); String title = r.getString(R.string.notification_district_points_title, districtCode); String contentText = r.getString(R.string.notification_district_points_updated, districtName); return new GenericNotificationViewModel(header, title, contentText, getNotificationTimeString(context), getIntent(context)); }
DistrictPointsUpdatedNotification extends BaseNotification<GenericNotificationViewModel> { @Nullable @Override public GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid) { Resources r = context.getResources(); String header = getNotificationCardHeader(context, districtName, districtKey); String districtCode = EventHelper.getEventCode(districtKey); String title = r.getString(R.string.notification_district_points_title, districtCode); String contentText = r.getString(R.string.notification_district_points_updated, districtName); return new GenericNotificationViewModel(header, title, contentText, getNotificationTimeString(context), getIntent(context)); } }
DistrictPointsUpdatedNotification extends BaseNotification<GenericNotificationViewModel> { @Nullable @Override public GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid) { Resources r = context.getResources(); String header = getNotificationCardHeader(context, districtName, districtKey); String districtCode = EventHelper.getEventCode(districtKey); String title = r.getString(R.string.notification_district_points_title, districtCode); String contentText = r.getString(R.string.notification_district_points_updated, districtName); return new GenericNotificationViewModel(header, title, contentText, getNotificationTimeString(context), getIntent(context)); } DistrictPointsUpdatedNotification(String messageData); }
DistrictPointsUpdatedNotification extends BaseNotification<GenericNotificationViewModel> { @Nullable @Override public GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid) { Resources r = context.getResources(); String header = getNotificationCardHeader(context, districtName, districtKey); String districtCode = EventHelper.getEventCode(districtKey); String title = r.getString(R.string.notification_district_points_title, districtCode); String contentText = r.getString(R.string.notification_district_points_updated, districtName); return new GenericNotificationViewModel(header, title, contentText, getNotificationTimeString(context), getIntent(context)); } DistrictPointsUpdatedNotification(String messageData); @Override void parseMessageData(); String getDistrictName(); String getDistrictKey(); @Override Notification buildNotification(Context context, FollowsChecker followsChecker); @Override Intent getIntent(Context c); @Override void updateDataLocally(); @Override int getNotificationId(); @Nullable @Override GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid); }
DistrictPointsUpdatedNotification extends BaseNotification<GenericNotificationViewModel> { @Nullable @Override public GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid) { Resources r = context.getResources(); String header = getNotificationCardHeader(context, districtName, districtKey); String districtCode = EventHelper.getEventCode(districtKey); String title = r.getString(R.string.notification_district_points_title, districtCode); String contentText = r.getString(R.string.notification_district_points_updated, districtName); return new GenericNotificationViewModel(header, title, contentText, getNotificationTimeString(context), getIntent(context)); } DistrictPointsUpdatedNotification(String messageData); @Override void parseMessageData(); String getDistrictName(); String getDistrictKey(); @Override Notification buildNotification(Context context, FollowsChecker followsChecker); @Override Intent getIntent(Context c); @Override void updateDataLocally(); @Override int getNotificationId(); @Nullable @Override GenericNotificationViewModel renderToViewModel(Context context, @Nullable Void aVoid);  }