Permalink
Browse files

Remove MNGEClipse1296, it is covered somewhere else

  • Loading branch information...
1 parent d947b9e commit d5f453b67cad8407443df5f242a65ca25822a5ed Pascal Rapicault committed Mar 9, 2011
Showing with 21 additions and 0 deletions.
  1. +21 −0 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/MarkerTest.java
@@ -15,12 +15,19 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.ide.IDE;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.markers.MavenMarkerManager;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.editor.xml.internal.lifecycle.LifecycleMappingProposal;
import org.eclipse.m2e.internal.discovery.markers.DiscoveryWizardProposal;
@@ -411,6 +418,18 @@ public void testMarkerResolutions() throws Exception {
assertNotNull(getResolution(resolutions, LifecycleMappingProposal.class));
}
+ public void testNoDuplicateMarker() throws CoreException {
+ final IProject p = workspace.getRoot().getProject(getName());
+ p.create(new NullProgressMonitor());
+ p.open(new NullProgressMonitor());
+ MavenMarkerManager mmm = new MavenMarkerManager(null);
+ mmm.addMarker(p, IMavenConstants.MARKER_CONFIGURATION_ID, Messages.ProjectConfigurationUpdateRequired, -1, IMarker.SEVERITY_ERROR);
+ assertEquals(1, p.findMarkers( IMavenConstants.MARKER_CONFIGURATION_ID, false /*includeSubtypes*/, IResource.DEPTH_ZERO).length);
+
+ mmm.addMarker(p, IMavenConstants.MARKER_CONFIGURATION_ID, Messages.ProjectConfigurationUpdateRequired, -1, IMarker.SEVERITY_ERROR);
+ assertEquals(1, p.findMarkers( IMavenConstants.MARKER_CONFIGURATION_ID, false /*includeSubtypes*/, IResource.DEPTH_ZERO).length);
+ }
+
private IMarkerResolution getResolution(IMarkerResolution[] resolutions, Class<? extends IMarkerResolution> type) {
if(resolutions == null) {
return null;
@@ -422,4 +441,6 @@ private IMarkerResolution getResolution(IMarkerResolution[] resolutions, Class<?
}
return null;
}
+
+
}

0 comments on commit d5f453b

Please sign in to comment.