<commit_before>/*******************************************************************************
 * Copyright (c) 2011 - <NAME>.
 * 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:
 *    <NAME> (<EMAIL>) - initial API and implementation
 ********************************************************************************
 *
 * Created: Jan 19, 2012
 */

package traffic.strategy;

import static org.junit.Assert.*;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.List;

import org.junit.Test;

import traffic.graph.Graph;
import traffic.graph.GraphNode;
import traffic.model.ConfigurationException;
import traffic.model.SimulationXMLReader;
import traffic.model.TrafficSimulator;

/**
 * @author <NAME> - <EMAIL>
 *
 */
public class AlwaysRecomputeVehicleStrategyTest {
	
	private VehicleStrategy strategy = new AlwaysRecomputeVehicleStrategy();

	@Test(timeout=10000)
	public void cityMapLifelock() throws FileNotFoundException, ConfigurationException {
		TrafficSimulator sim = SimulationXMLReader.buildSimulator( new File("resources/test/168-1280-0.xml") );
		sim.run();

		//		strategy.setGraph(g);
//		List<GraphNode> path = strategy.getPath( g.getNode(1), g.getNode(5));
//		assertNotNull( "No path found", path );
//		assertEquals( "Path too short", 2, path.size() );
//		assertEquals( 6, path.get(0).getID() );
//		path = strategy.getPath(g.getNode(1), g.getNode(4));
//		assertNotNull( "No path found", path );
//		assertEquals( "Path too short", 2, path.size() );
//		assertTrue( 3 == (int)path.get(0).getID() || 2 == (int)path.get(0).getID() );
//		path = strategy.getPath( g.getNode(0), g.getNode(4));
//		assertNotNull( "No path found", path );
//		assertEquals( "Path too short", 3, path.size() );
//		assertTrue( 3 == (int)path.get(1).getID() || 5 == (int)path.get(1).getID() );	
	}
	
	@Test
	public void cityMapLifelock2() throws FileNotFoundException, ConfigurationException {
		TrafficSimulator sim = SimulationXMLReader.buildSimulator( new File("resources/test/lifelock-city-1.xml") );
		sim.run();
	}


}<commit_msg>Removed "unused..." warnings.<commit_after>/*******************************************************************************
 * Copyright (c) 2011 - <NAME>.
 * 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:
 *    <NAME> (<EMAIL>) - initial API and implementation
 ********************************************************************************
 *
 * Created: Jan 19, 2012
 */

package traffic.strategy;

import java.io.File;
import java.io.FileNotFoundException;

import org.junit.Test;

import traffic.model.ConfigurationException;
import traffic.model.SimulationXMLReader;
import traffic.model.TrafficSimulator;

/**
 * @author <NAME> - <EMAIL>
 *
 */
public class AlwaysRecomputeVehicleStrategyTest {
	
	@Test(timeout=10000)
	public void cityMapLifelock() throws FileNotFoundException, ConfigurationException {
		TrafficSimulator sim = SimulationXMLReader.buildSimulator( new File("resources/test/168-1280-0.xml") );
		sim.run();

		//		strategy.setGraph(g);
//		List<GraphNode> path = strategy.getPath( g.getNode(1), g.getNode(5));
//		assertNotNull( "No path found", path );
//		assertEquals( "Path too short", 2, path.size() );
//		assertEquals( 6, path.get(0).getID() );
//		path = strategy.getPath(g.getNode(1), g.getNode(4));
//		assertNotNull( "No path found", path );
//		assertEquals( "Path too short", 2, path.size() );
//		assertTrue( 3 == (int)path.get(0).getID() || 2 == (int)path.get(0).getID() );
//		path = strategy.getPath( g.getNode(0), g.getNode(4));
//		assertNotNull( "No path found", path );
//		assertEquals( "Path too short", 3, path.size() );
//		assertTrue( 3 == (int)path.get(1).getID() || 5 == (int)path.get(1).getID() );	
	}
	
	@Test
	public void cityMapLifelock2() throws FileNotFoundException, ConfigurationException {
		TrafficSimulator sim = SimulationXMLReader.buildSimulator( new File("resources/test/lifelock-city-1.xml") );
		sim.run();
	}


}
{'fraction_non_alphanumeric': 0.21805714285714287, 'fraction_numerical': 0.021942857142857142, 'mean_word_length': 4.742782152230971, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3631841', 'n_tokens_mistral': 1414, 'n_tokens_neox': 1334, 'n_words': 318}