//
// This file is part of the Prose Development Tools for Eclipse package.
//
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
//
// The Original Code is Prose Development Tools for Eclipse.
//
// The Initial Developer of the Original Code is Angela Nicoara. Portions
// created by Angela Nicoara are Copyright (C) 2006 Angela Nicoara.
// All Rights Reserved.
//
// Contributor(s):
// $Id: ProseRunsTest.java,v 1.1 2008/11/18 12:37:15 anicoara Exp $
// ==============================================================================
//
package ch.ethz.prose.eclipse.test;
import junit.framework.TestCase;
import ch.ethz.prose.eclipse.internal.core.ProsePlugin;
import ch.ethz.prose.eclipse.internal.run.ProseRunNode;
/**
* @author Angela Nicoara
* @author Johann Gyger
* @version $Id: ProseRunsTest.java,v 1.1 2008/11/18 12:37:15 anicoara Exp $
*/
public class ProseRunsTest extends TestCase {
protected ProseRunNode run;
protected ProsePlugin plugin;
protected void setUp() {
run = new ProseRunNode("test", "dummyhost", -1, null);
plugin = ProsePlugin.getDefault();
}
/**
* Test if Prose runs are added.
*/
public void testProseRunAdd() {
int count = plugin.getRuns().length;
plugin.addRun(run);
assertEquals(count + 1, plugin.getRuns().length);
plugin.removeRun(run);
}
/**
* Test if Prose runs are removed.
*/
public void testProseRunRemove() {
plugin.addRun(run);
int count = plugin.getRuns().length;
plugin.removeRun(run);
assertEquals(count - 1, plugin.getRuns().length);
}
}