Skip to content

Uncovered UI code #205

@LorenzoBettini

Description

@LorenzoBettini

Tests do not yet cover some code.

Investigate that, especially for #136

org.pitest.pitclipse.launch.ui:

  • org.pitest.pitclipse.launch.ui.PitLaunchShortcut
    • A test with no tests
      • If we select a README (non Java element) in the project explorer, it just doesn't run anything, but we should show "no tests found" 3b9ee62
      • If we select two elements, we get "no tests found" a2d2793
      • If we select a field and we run, we get the dialog "no tests found" 624f966
    • Run PIT on a BinaryTest class file ffdbdb5 74381e7
    • A test with several launch configurations (prepare a project with saved launch configurations) ae4e464 b7122ba
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(Object[], String) ignoring exceptions 078dc39
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.hasSameAttributes(ILaunchConfiguration, ILaunchConfiguration, String[]) ignores exceptions ed5a2e6
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.createLaunchConfiguration(IJavaElement) case for method: select a method in the project explorer; example foo.bar.FooTest.fooTest3() d82c9f1
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(ISelection, String) I don't see how it cannot be a StructuredSelection d311a2c
    • PitLaunchShortcut.createLaunchConfiguration(IJavaElement) cannot get to an invalid selection since it's filtered beforehand in org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(Object[], String) beb2bb9
  • test for running from the editor
    • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.launch(IEditorPart, String) 5184f4a
    • If we open README in an editor and we run, we get the dialog "no tests found" 5184f4a
    • PitLaunchShortcut.getLaunchConfigurations(ISelection) I don't see how it cannot be a StructuredSelection (and it's called from here: org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getParticipatingLaunchConfigurations(IStructuredSelection, IResource, List, String), where it's a structured selection). 4408201
    • editor context menus?
  • org.pitest.pitclipse.launch.ui.PitLaunchShortcut.getLaunchConfigurations(ISelection) is called when something is selected and we hover on the toolbar button
    • "Run" toolbar button 777b2c9
    • Also when editor is selected c17de18
    • but again we must assume structured selection?
  • org.pitest.pitclipse.launch.ui.LaunchShortcut 6f7dc07 478c298

The above tasks have been addressed in #206

org.pitest.pitclipse.ui:

  • Visitor adapter with default implementations (that must be uncovered) 9c29d68
  • ViewContentProvider should assume Visitable object and no check for instanceof 1c30b28
  • ViewLabelProvider similar and there are other cases that cannot take place 72aa6ec
  • OpenMutationDoubleClick a4e38fd 5d15bc8
    • PitclipseLaunchUiUtils should be in PitclipseUiUtils since .launch.ui depends on .ui 38c5583
  • ExpandingDoubleClick b4dd65d
  • PitViewFinder when the views are closed return NoOpMutationsView NoOpSummaryView but maybe it should also try to open them? Instead we have
private static synchronized void activateViewOnceAndOnceOnly(String viewId) throws PartInitException {
    if (!initialisedViews.contains(viewId)) {
        IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        activePage.showView(viewId);
        initialisedViews.add(viewId);
    }
}

done in 62d7009

The above tasks have been addressed in #207

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions