test_class.declarator: timeInstantView
test_class.modifier: @Mock
test_class.original_string: @Mock
      TimeInstantEditor.View timeInstantView;
test_class.type: TimeInstantEditor.View
test_class.var_name: timeInstantView
test_class.declarator: timeAmountEditor
test_class.modifier: @Mock
test_class.original_string: @Mock
      TimeAmountEditor timeAmountEditor;
test_class.type: TimeAmountEditor
test_class.var_name: timeAmountEditor
test_class.declarator: changeCommand
test_class.modifier: @Mock
test_class.original_string: @Mock
      Command changeCommand;
test_class.type: Command
test_class.var_name: changeCommand
test_class.file: dashbuilder-client/dashbuilder-displayer-client/src/test/java/org/dashbuilder/displayer/client/widgets/filter/TimeInstantEditorTest.java
test_class.identifier: TimeInstantEditorTest
test_case.body: @Test
      public void testChangeTimeMode() {
          when(timeInstantView.getTimeModeSelectedIndex()).thenReturn(TimeInstant.TimeMode.BEGIN.getIndex());
  
          TimeInstantEditor timeInstantEditor = new TimeInstantEditor(timeInstantView, timeAmountEditor);
          timeInstantEditor.init(null, changeCommand);
          timeInstantEditor.changeTimeMode();
  
          TimeInstant timeInstant = timeInstantEditor.getTimeInstant();
          assertEquals(timeInstant.getTimeMode(), TimeInstant.TimeMode.BEGIN);
          verify(changeCommand).execute();
      }
test_case.class_method_signature: TimeInstantEditorTest.testChangeTimeMode()
test_case.full_signature: @Test public void testChangeTimeMode()
test_case.identifier: testChangeTimeMode
test_case.invocations: thenReturn when getTimeModeSelectedIndex getIndex init changeTimeMode getTimeInstant assertEquals getTimeMode execute verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testChangeTimeMode()
focal_class.declarator: INTERVAL_TYPES = Arrays.asList(
              DateIntervalType.MINUTE,
              DateIntervalType.HOUR,
              DateIntervalType.DAY,
              DateIntervalType.MONTH,
              DateIntervalType.QUARTER,
              DateIntervalType.YEAR,
              DateIntervalType.CENTURY,
              DateIntervalType.MILLENIUM)
focal_class.modifier: static
focal_class.original_string: static List<DateIntervalType> INTERVAL_TYPES = Arrays.asList(
              DateIntervalType.MINUTE,
              DateIntervalType.HOUR,
              DateIntervalType.DAY,
              DateIntervalType.MONTH,
              DateIntervalType.QUARTER,
              DateIntervalType.YEAR,
              DateIntervalType.CENTURY,
              DateIntervalType.MILLENIUM);
focal_class.type: List<DateIntervalType>
focal_class.var_name: INTERVAL_TYPES
focal_class.declarator: view
focal_class.original_string: View view;
focal_class.type: View
focal_class.var_name: view
focal_class.declarator: timeInstant = null
focal_class.original_string: TimeInstant timeInstant = null;
focal_class.type: TimeInstant
focal_class.var_name: timeInstant
focal_class.declarator: timeAmountEditor = null
focal_class.original_string: TimeAmountEditor timeAmountEditor = null;
focal_class.type: TimeAmountEditor
focal_class.var_name: timeAmountEditor
focal_class.declarator: onChangeCommand = new Command() { public void execute() {} }
focal_class.original_string: Command onChangeCommand = new Command() { public void execute() {} };
focal_class.type: Command
focal_class.var_name: onChangeCommand
focal_class.file: dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/widgets/filter/TimeInstantEditor.java
focal_class.identifier: TimeInstantEditor
focal_class.interfaces: implements IsWidget
focal_class.class_method_signature: TimeInstantEditor.TimeInstantEditor(View view, TimeAmountEditor timeAmountEditor)
focal_class.full_signature: @Inject public  TimeInstantEditor(View view, TimeAmountEditor timeAmountEditor)
focal_class.identifier: TimeInstantEditor
focal_class.modifiers: @Inject public
focal_class.parameters: (View view, TimeAmountEditor timeAmountEditor)
focal_class.signature:  TimeInstantEditor(View view, TimeAmountEditor timeAmountEditor)
focal_class.class_method_signature: TimeInstantEditor.asWidget()
focal_class.full_signature: @Override public Widget asWidget()
focal_class.identifier: asWidget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Widget
focal_class.signature: Widget asWidget()
focal_class.class_method_signature: TimeInstantEditor.getTimeInstant()
focal_class.full_signature: public TimeInstant getTimeInstant()
focal_class.identifier: getTimeInstant
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TimeInstant
focal_class.signature: TimeInstant getTimeInstant()
focal_class.class_method_signature: TimeInstantEditor.init(final TimeInstant ti, final Command onChangeCommand)
focal_class.full_signature: public void init(final TimeInstant ti, final Command onChangeCommand)
focal_class.identifier: init
focal_class.modifiers: public
focal_class.parameters: (final TimeInstant ti, final Command onChangeCommand)
focal_class.return: void
focal_class.signature: void init(final TimeInstant ti, final Command onChangeCommand)
focal_class.class_method_signature: TimeInstantEditor.getTimeAmountEditor()
focal_class.full_signature: public TimeAmountEditor getTimeAmountEditor()
focal_class.identifier: getTimeAmountEditor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TimeAmountEditor
focal_class.signature: TimeAmountEditor getTimeAmountEditor()
focal_class.class_method_signature: TimeInstantEditor.initTimeModeSelector()
focal_class.full_signature: protected void initTimeModeSelector()
focal_class.identifier: initTimeModeSelector
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initTimeModeSelector()
focal_class.class_method_signature: TimeInstantEditor.initIntervalTypeSelector()
focal_class.full_signature: protected void initIntervalTypeSelector()
focal_class.identifier: initIntervalTypeSelector
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initIntervalTypeSelector()
focal_class.class_method_signature: TimeInstantEditor.changeTimeMode()
focal_class.full_signature:  void changeTimeMode()
focal_class.identifier: changeTimeMode
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void changeTimeMode()
focal_class.class_method_signature: TimeInstantEditor.changeIntervalType()
focal_class.full_signature:  void changeIntervalType()
focal_class.identifier: changeIntervalType
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void changeIntervalType()
focal_method.body: void changeTimeMode() {
          int selectedIdx = view.getTimeModeSelectedIndex();
  
          TimeInstant.TimeMode mode = TimeInstant.TimeMode.getByIndex(selectedIdx);
          timeInstant.setTimeMode(mode);
          TimeAmount timeAmount = timeInstant.getTimeAmount();
          if (timeAmount != null) {
              timeAmount.setQuantity(0);
          }
  
          onChangeCommand.execute();
          initIntervalTypeSelector();
      }
focal_method.class_method_signature: TimeInstantEditor.changeTimeMode()
focal_method.full_signature:  void changeTimeMode()
focal_method.identifier: changeTimeMode
focal_method.invocations: getTimeModeSelectedIndex getByIndex setTimeMode getTimeAmount setQuantity execute initIntervalTypeSelector
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void changeTimeMode()