Package se.gu.fire.backend

Source Code of se.gu.fire.backend.ConfirmRegistrationBeanTest

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package se.gu.fire.backend;

import javax.persistence.EntityManager;
import javax.persistence.Persistence;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import se.gu.fire.backend.intersession.InterSessionContextBean;
import se.gu.fire.core.FireUser;
import se.gu.fire.util.test.TestUtil;

/**
*
* @author christopher
*/
public class ConfirmRegistrationBeanTest {

    private InterSessionContextBean interSessionContextBean;
    private ConfirmRegistrationBean confirmRegistrationBean;
    private static EntityManager em;

    public ConfirmRegistrationBeanTest() {
    }

    @BeforeClass
    public static void setUpClass() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
        interSessionContextBean = new InterSessionContextBean();
        confirmRegistrationBean = new ConfirmRegistrationBean();
        em = Persistence.createEntityManagerFactory(TestUtil.TEST_PU_NAME).createEntityManager();
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of doFinishRegistration method, of class ConfirmRegistrationBean.
     */
    @Test
    public void testDoFinishRegistration() {

        FireUser user = TestUtil.createRandomUser();
        String password = "haxx";

        interSessionContextBean.addRegistrationSessionData(user, password);
        confirmRegistrationBean.setPasswordManager(null);
       
       
    }
}
TOP

Related Classes of se.gu.fire.backend.ConfirmRegistrationBeanTest

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.