Bug 287536 [CommonNavigator] Wrong sorter unit tests
Build ID: Build id: I20090611-1540 Steps To Reproduce: Several tests in SorterTest rely on the dynamicAddModelObjects method. That method breaks the contract of viewer.add ("This method should be called (by the content provider) when a single * element has been added to the model") in that it calls viewer.add(newData) but doesn't actually add newData to the project. More information: The corresponding tests will fail if for example _viewer.add(parent, children) is implemented as _viewer.refresh(parent), which should not make any difference.
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SorterTest.java
/*******************************************************************************
 * Copyright (c) 2008, 2010 Oakland Software Incorporated and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Oakland Software Incorporated - initial API and implementation
 *     IBM Corporation - fixed dead code warning
 *******************************************************************************/
package org.eclipse.ui.tests.navigator;
import java.util.Properties;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.internal.navigator.NavigatorPlugin;
import org.eclipse.ui.navigator.INavigatorContentDescriptor;
import org.eclipse.ui.tests.harness.util.DisplayHelper;
import org.eclipse.ui.tests.navigator.extension.TestContentProvider;
import org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData;
import org.eclipse.ui.tests.navigator.extension.TestContentProviderResource;
import org.eclipse.ui.tests.navigator.extension.TestSorterDataAndResource;
import org.eclipse.ui.tests.navigator.extension.TestSorterResource;
public class SorterTest extends NavigatorTestBase {