Package eu.planets_project.pp.plato.test.controller

Source Code of eu.planets_project.pp.plato.test.controller.NewProjectTest

/*******************************************************************************
* Copyright (c) 2006-2010 Vienna University of Technology,
* Department of Software Technology and Interactive Systems
*
* All rights reserved. This program and the accompanying
* materials are made available under the terms of the
* Apache License, Version 2.0 which accompanies
* this distribution, and is available at
* http://www.apache.org/licenses/LICENSE-2.0
*******************************************************************************/

package eu.planets_project.pp.plato.test.controller;

import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.Test;

import eu.planets_project.pp.plato.model.Plan;


public class NewProjectTest extends SeamTest {

    @Test
    public void testNewProject () throws Exception {

        String id;
        id = new FacesRequest("/project/newproject.xhtml") {

            @Override
            protected void applyRequestValues()throws Exception {
            }

            @Override
            protected void invokeApplication() throws Exception {

                invokeMethod("#{newProject.createProject}");
            }

            @Override
            protected void renderResponse() throws Exception {
                Plan p = (Plan)getValue("#{selectedPlan}");

                assert p == null;
            }

        }.run();
    }
}
TOP

Related Classes of eu.planets_project.pp.plato.test.controller.NewProjectTest

TOP
Copyright © 2018 www.massapi.com. 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.