test_class.file: app/src/test/java/org/unicef/rapidreg/utils/UtilsTest.java
test_class.identifier: UtilsTest
test_case.body: @Test
      public void should_show_message_by_toast_when_given_res_id() throws Exception {
          Context context = mock(Context.class);
          ViewGroup group = mock(ViewGroup.class);
          Toast toast = mock(Toast.class);
          TextView textView = mock(TextView.class);
          Resources resources = mock(Resources.class);
  
          when(Toast.makeText(context, 0, Toast.LENGTH_SHORT)).thenReturn(toast);
          when(toast.getView()).thenReturn(group);
          when(group.getChildAt(anyInt())).thenReturn(textView);
          when(context.getResources()).thenReturn(resources);
          when(resources.getDimension(anyInt())).thenReturn(0f);
  
          Utils.showMessageByToast(context, 0, Toast.LENGTH_SHORT);
  
          verify(toast, times(1)).getView();
          verify(group, times(1)).getChildAt(anyInt());
          verify(context, times(1)).getResources();
          verify(resources, times(1)).getDimension(anyInt());
          verify(toast, times(1)).show();
          verify(textView, times(1)).setTextSize(anyFloat());
      }
test_case.class_method_signature: UtilsTest.should_show_message_by_toast_when_given_res_id()
test_case.full_signature: @Test public void should_show_message_by_toast_when_given_res_id()
test_case.identifier: should_show_message_by_toast_when_given_res_id
test_case.invocations: mock mock mock mock mock thenReturn when makeText thenReturn when getView thenReturn when getChildAt anyInt thenReturn when getResources thenReturn when getDimension anyInt showMessageByToast getView verify times getChildAt verify times anyInt getResources verify times getDimension verify times anyInt show verify times setTextSize verify times anyFloat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_show_message_by_toast_when_given_res_id()
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 void showMessageByToast(Context context, int ResId, int duration) {
          Toast toast = Toast.makeText(context, ResId, duration);
          initToastStyle(context, toast);
      }
focal_method.class_method_signature: Utils.showMessageByToast(Context context, int ResId, int duration)
focal_method.full_signature: public static void showMessageByToast(Context context, int ResId, int duration)
focal_method.identifier: showMessageByToast
focal_method.invocations: makeText initToastStyle
focal_method.modifiers: public static
focal_method.parameters: (Context context, int ResId, int duration)
focal_method.return: void
focal_method.signature: void showMessageByToast(Context context, int ResId, int duration)