@Test public void should_build_2_slash_1() { String status = "2 / 1"; InboxResponse inboxResponse = createInboxResponse(2); NotificationsResponse notificationsResponse = createNotificationResponse(1); StatusBuilder statusBuilder = new StatusBuilder(notificationsResponse, inboxResponse); assertEquals(status, statusBuilder.build()); }
public String build() { String status = ""; if(validNotificationsResponse() && validInboxResponse()) { status = inboxResponse.count + " / " + notificationResponse.count; } else if(validNotificationsResponse()) { status = String.valueOf(notificationResponse.count); } else if(validInboxResponse()) { status = String.valueOf(inboxResponse.count); } return status; }
StatusBuilder extends UpdateBuilder { public String build() { String status = ""; if(validNotificationsResponse() && validInboxResponse()) { status = inboxResponse.count + " / " + notificationResponse.count; } else if(validNotificationsResponse()) { status = String.valueOf(notificationResponse.count); } else if(validInboxResponse()) { status = String.valueOf(inboxResponse.count); } return status; } }
StatusBuilder extends UpdateBuilder { public String build() { String status = ""; if(validNotificationsResponse() && validInboxResponse()) { status = inboxResponse.count + " / " + notificationResponse.count; } else if(validNotificationsResponse()) { status = String.valueOf(notificationResponse.count); } else if(validInboxResponse()) { status = String.valueOf(inboxResponse.count); } return status; } StatusBuilder(NotificationsResponse notificationsResponse, InboxResponse inboxResponse); }
StatusBuilder extends UpdateBuilder { public String build() { String status = ""; if(validNotificationsResponse() && validInboxResponse()) { status = inboxResponse.count + " / " + notificationResponse.count; } else if(validNotificationsResponse()) { status = String.valueOf(notificationResponse.count); } else if(validInboxResponse()) { status = String.valueOf(inboxResponse.count); } return status; } StatusBuilder(NotificationsResponse notificationsResponse, InboxResponse inboxResponse); String buildCondensed(); String build(); }
StatusBuilder extends UpdateBuilder { public String build() { String status = ""; if(validNotificationsResponse() && validInboxResponse()) { status = inboxResponse.count + " / " + notificationResponse.count; } else if(validNotificationsResponse()) { status = String.valueOf(notificationResponse.count); } else if(validInboxResponse()) { status = String.valueOf(inboxResponse.count); } return status; } StatusBuilder(NotificationsResponse notificationsResponse, InboxResponse inboxResponse); String buildCondensed(); String build();  }