Package org.spw.controller

Source Code of org.spw.controller.OptionValueControllerTest

/*
* OptionValueControllerTest.java
* JUnit based test
*
* Created on 17 August 2007, 21:03
*/

package org.spw.controller;

import junit.framework.*;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.NoResultException;
import javax.persistence.Persistence;
import javax.persistence.Query;
import org.spw.model.OptionValue;
import org.spw.model.OptionValuePK;

/**
*
* @author PSe
*/
public class OptionValueControllerTest extends TestCase {
   
    public OptionValueControllerTest(String testName) {
        super(testName);
    }

    protected void setUp() throws Exception {
    }

    protected void tearDown() throws Exception {
    }

    /**
     * Test of getOptionValues method, of class org.spw.controller.OptionValueController.
     */
    public void testGetOptionValues() {
        System.out.println("getOptionValues");
       
        OptionValueController instance = new OptionValueController();
       
        List<OptionValue> result = instance.getOptionValues();
        assertNotNull(result);
        assertTrue(result.size() > 0);
    }

    /**
     * Test of getOptionValueByName method, of class org.spw.controller.OptionValueController.
     */
    public void testGetOptionValueByName() {
        System.out.println("getOptionValueByName");
       
        String option = OptionValueController.CONTRACT_TYPES;
        OptionValueController instance = new OptionValueController();
       
        List<OptionValue> result = instance.getOptionValueByName(option);
        assertNotNull(result);
        assertTrue(result.size() > 0);
    }

    /**
     * Test of getOptionValueByLabel method, of class org.spw.controller.OptionValueController.
     */
    public void testGetOptionValueByLabel() {
        System.out.println("getOptionValueByLabel");
       
        String option = OptionValueController.CONTRACT_TYPES;;
        String key = "Full time";
        OptionValueController instance = new OptionValueController();
       
        OptionValue result = instance.getOptionValueByLabel(option, key);
        assertNotNull(result);
    }


}
TOP

Related Classes of org.spw.controller.OptionValueControllerTest

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.