/*
Copyright (C) 2013-2017 Pierre-François Gimenez

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>
*/

package tests;

import org.junit.Before;
import org.junit.Test;

import scripts.Strategie;

/**
 * Tests unitaires pour les capteurs
 * @author pf
 *
 */

public class JUnit_Strategie extends JUnit_Test {

	private Strategie strat;
	
	@Override
	@Before
    public void setUp() throws Exception {
        super.setUp();
        strat = container.getService(Strategie.class);
    }
	
	@Test
	public void test_strat() throws Exception
	{
		strat.doWinMatch();
	}

}

@@ -725,16 +725,191 @@
 .Test;%0A%0A
+import pathfinding.ChronoGameState;%0Aimport pathfinding.KeyPathCache;%0Aimport pathfinding.PathCache;%0Aimport robot.Cinematique;%0Aimport robot.Speed;%0Aimport scripts.ScriptManager;%0A
 import s
@@ -926,16 +926,16 @@
 ategie;%0A
-
 %0A/**%0A * 
@@ -1067,16 +1067,101 @@
  strat;%0A
+%09private PathCache path;%0A%09private ChronoGameState chrono;%0A%09private ScriptManager sm;%0A
 %09%0A%09@Over
@@ -1295,20 +1295,503 @@
 class);%0A
-
     
+    path = container.getService(PathCache.class);%0A        chrono = container.make(ChronoGameState.class);%0A        sm = container.getService(ScriptManager.class);%0A    %7D%0A%09%0A%09@Test%0A%09public void test_pathcache() throws Exception%0A%09%7B%0A%09%09chrono.robot.setCinematique(new Cinematique(700, 1800, Math.PI, true, 0, Speed.STANDARD.translationalSpeed));%0A%09%09path.prepareNewPathToScript(new KeyPathCache(chrono, sm.getScripts().get(%22MINERAI_CRATERE_HAUT_GAUCHE%22), false));%0A%09%09path.sendPreparedPath();%0A%09
 %7D%0A%09%0A%09@Te

Test de chemins précalculés