test_class.file: app/src/test/java/org/unicef/rapidreg/utils/UtilsTest.java
test_class.identifier: UtilsTest
test_case.body: @Test
      public void should_throw_exception_when_data_string_format_error() throws Exception {
          String str = "aa";
  
          Date date = new Date(System.currentTimeMillis());
          Date actual = Utils.getRegisterDateAsDdMmYyyy(str);
  
          assertThat("Should return same day", actual.getDay(), is(date.getDay()));
          assertThat("Should return same month", actual.getMonth(), is(date.getMonth()));
          assertThat("Should return same year", actual.getYear(), is(date.getYear()));
      }
test_case.class_method_signature: UtilsTest.should_throw_exception_when_data_string_format_error()
test_case.full_signature: @Test public void should_throw_exception_when_data_string_format_error()
test_case.identifier: should_throw_exception_when_data_string_format_error
test_case.invocations: currentTimeMillis getRegisterDateAsDdMmYyyy assertThat getDay is getDay assertThat getMonth is getMonth assertThat getYear is getYear
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_throw_exception_when_data_string_format_error()
focal_class.declarator: TAG = Utils.class.getSimpleName()
focal_class.modifier: private static final
focal_class.original_string: private static final String TAG = Utils.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.file: app/src/main/java/org/unicef/rapidreg/utils/Utils.java
focal_class.identifier: Utils
focal_class.class_method_signature: Utils.toStringResult(List<String> result)
focal_class.full_signature: public static String toStringResult(List<String> result)
focal_class.identifier: toStringResult
focal_class.modifiers: public static
focal_class.parameters: (List<String> result)
focal_class.return: String
focal_class.signature: String toStringResult(List<String> result)
focal_class.class_method_signature: Utils.convert(String mapString)
focal_class.full_signature: public static Map convert(String mapString)
focal_class.identifier: convert
focal_class.modifiers: public static
focal_class.parameters: (String mapString)
focal_class.return: Map
focal_class.signature: Map convert(String mapString)
focal_class.class_method_signature: Utils.checkFormat(int len)
focal_class.full_signature: private static void checkFormat(int len)
focal_class.identifier: checkFormat
focal_class.modifiers: private static
focal_class.parameters: (int len)
focal_class.return: void
focal_class.signature: void checkFormat(int len)
focal_class.class_method_signature: Utils.getRegisterDateAsDdMmYyyy(String registrationDateString)
focal_class.full_signature: public static Date getRegisterDateAsDdMmYyyy(String registrationDateString)
focal_class.identifier: getRegisterDateAsDdMmYyyy
focal_class.modifiers: public static
focal_class.parameters: (String registrationDateString)
focal_class.return: Date
focal_class.signature: Date getRegisterDateAsDdMmYyyy(String registrationDateString)
focal_class.class_method_signature: Utils.getRegisterDateByYyyyMmDd(String registrationDateString)
focal_class.full_signature: public static Date getRegisterDateByYyyyMmDd(String registrationDateString)
focal_class.identifier: getRegisterDateByYyyyMmDd
focal_class.modifiers: public static
focal_class.parameters: (String registrationDateString)
focal_class.return: Date
focal_class.signature: Date getRegisterDateByYyyyMmDd(String registrationDateString)
focal_class.class_method_signature: Utils.clearAudioFile(String fileName)
focal_class.full_signature: public static void clearAudioFile(String fileName)
focal_class.identifier: clearAudioFile
focal_class.modifiers: public static
focal_class.parameters: (String fileName)
focal_class.return: void
focal_class.signature: void clearAudioFile(String fileName)
focal_class.class_method_signature: Utils.showMessageByToast(Context context, int ResId, int duration)
focal_class.full_signature: public static void showMessageByToast(Context context, int ResId, int duration)
focal_class.identifier: showMessageByToast
focal_class.modifiers: public static
focal_class.parameters: (Context context, int ResId, int duration)
focal_class.return: void
focal_class.signature: void showMessageByToast(Context context, int ResId, int duration)
focal_class.class_method_signature: Utils.showMessageByToast(Context context, String message, int duration)
focal_class.full_signature: public static void showMessageByToast(Context context, String message, int duration)
focal_class.identifier: showMessageByToast
focal_class.modifiers: public static
focal_class.parameters: (Context context, String message, int duration)
focal_class.return: void
focal_class.signature: void showMessageByToast(Context context, String message, int duration)
focal_class.class_method_signature: Utils.initToastStyle(Context context, Toast toast)
focal_class.full_signature: private static void initToastStyle(Context context, Toast toast)
focal_class.identifier: initToastStyle
focal_class.modifiers: private static
focal_class.parameters: (Context context, Toast toast)
focal_class.return: void
focal_class.signature: void initToastStyle(Context context, Toast toast)
focal_method.body: public static Date getRegisterDateAsDdMmYyyy(String registrationDateString) {
          SimpleDateFormat registrationDateFormat = new SimpleDateFormat("dd/MM/yyyy");
          try {
              java.util.Date date = registrationDateFormat.parse(registrationDateString);
              return new Date(date.getTime());
          } catch (ParseException e) {
              return new Date(System.currentTimeMillis());
          }
      }
focal_method.class_method_signature: Utils.getRegisterDateAsDdMmYyyy(String registrationDateString)
focal_method.full_signature: public static Date getRegisterDateAsDdMmYyyy(String registrationDateString)
focal_method.identifier: getRegisterDateAsDdMmYyyy
focal_method.invocations: parse getTime currentTimeMillis
focal_method.modifiers: public static
focal_method.parameters: (String registrationDateString)
focal_method.return: Date
focal_method.signature: Date getRegisterDateAsDdMmYyyy(String registrationDateString)