Package nz.ac.massey.softwarec.group3.actions

Examples of nz.ac.massey.softwarec.group3.actions.Action


    throws ServletException, IOException  {
    try{
      String cmd = req.getParameter("cmd");
      //if(action != null){
        //On met le paramétre menu pour aller sur la page d'accueil
        Action a = (Action)actions.get(cmd);
        if(a == null){
          throw new Exception("Commande Erronée !");
        }
       
        System.out.println("cmd = "+cmd);
       
        String next = a.execute(req);       
        String suivant = SEP+next;
               
        System.out.println("suivant = "+suivant);
        RequestDispatcher rq = context.getRequestDispatcher(suivant);
        rq.forward(req,res);
View Full Code Here


    throws ServletException, IOException  {
    try{
      String cmd = req.getParameter("cmd");
      //if(action != null){
        //On met le paramétre menu pour aller sur la page d'accueil
        Action a = (Action)actions.get(cmd);
        if(a == null){
          throw new Exception("Commande Erronée !");
        }
       
        System.out.println("cmd = "+cmd);
       
        String next = a.execute(req);       
        String suivant = SEP+next;
               
        System.out.println("suivant = "+suivant);
        RequestDispatcher rq = context.getRequestDispatcher(suivant);
        rq.forward(req,res);
View Full Code Here

     * Test of getGame method, of class Action.
     */
    @Test
    public void testGetGame() {
        System.out.println("getGame");
        Game result = actionTest.getGame();
        Game expResult = game;
        assertEquals(result, expResult);
    }
View Full Code Here

   
    @Before
    public void setUp() {
        player=new Player(5,5,5,false);
        game=new Game("username",001);
        instance=new Action(player,"action","value",game,session);
    }
View Full Code Here

     */
    @Test
    public void testGetGame() {
        System.out.println("getGame");

        Game result = instance.getGame();
        assertEquals(game, result);
    }
View Full Code Here

    public void testPerformAction() {
        System.out.println("performAction");
       
     
       Player  player=new Player(5,5,5,false);
       Game game=new Game("username",001);
       Action action=new Action(player,"action","value",game,session);
       
        ActionPerformerInterface instance = new ActionPerformerInterfaceImpl();
        instance.performAction(action);
View Full Code Here

       
       
        System.out.println("getGameMadeByCreator");
       
       String creatorUserName="wanting";
       Game result=instance.createNewGame("wanting");
       Game expect=instance.getGameMadeByCreator(creatorUserName);
       assertSame(expect,result)

    }
View Full Code Here

    @Test
    public void testGetGameWithUserInIt() {
       
        System.out.println("getGameWithUserInIt");
       
        Game result=instance.createNewGame("wanting");
        Game expResult=instance.getGameWithUserInIt("wanting");       
  
        assertEquals(expResult, result);

    }
View Full Code Here

     * Test of getGameData method, of class DataGetterInterface.
     */
    @Test
    public void testGetGameData() {
        System.out.println("getGameData");
        Game game = null;
        DataGetterInterface instance = new DataGetterInterfaceImpl();
        String expResult = "";
        String result = instance.getGameData(game);
        assertEquals(expResult, result);

View Full Code Here

     * Test of getGamePlayersData method, of class DataGetterInterface.
     */
    @Test
    public void testGetGamePlayersData() {
        System.out.println("getGamePlayersData");
        Game game = null;
        DataGetterInterface instance = new DataGetterInterfaceImpl();
        String expResult = "";
        String result = instance.getGamePlayersData(game);
        assertEquals(expResult, result);

View Full Code Here

TOP

Related Classes of nz.ac.massey.softwarec.group3.actions.Action

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.