Package com.comprainsumos.MPersistencia

Source Code of com.comprainsumos.MPersistencia.MPinsumoProveedorTest

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.comprainsumos.MPersistencia;

import com.comprainsumos.modelo.Insumo;
import com.comprainsumos.modelo.InsumoProveedor;
import java.util.List;
import org.junit.*;
import static org.junit.Assert.*;

/**
*
* @author Lucamo
*/
public class MPinsumoProveedorTest {
   
    public MPinsumoProveedorTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }
   
    @Before
    public void setUp() {
    }
   
    @After
    public void tearDown() {
    }

    /**
     * Test of crearInsumoProveedor method, of class MPinsumoProveedor.
     */
    //@Test
    public void testCrearInsumoProveedor() throws Exception {
        System.out.println("crearInsumoProveedor");
        InsumoProveedor insumosP = new InsumoProveedor(0, 1, 1, 5, 1.000, "Activo");
        MPinsumoProveedor.crearInsumoProveedor(insumosP);
        // TODO review the generated test code and remove the default call to fail.
       
    }

    /**
     * Test of delInsumoProveedor method, of class MPinsumoProveedor.
     */
    //@Test
    public void testDelInsumoProveedor() throws Exception {
        System.out.println("delInsumoProveedor");
        int codigo = 0;
        MPinsumoProveedor.delInsumoProveedor(1);
        // TODO review the generated test code and remove the default call to fail.
      
    }

    /**
     * Test of modInsumoProveedor method, of class MPinsumoProveedor.
     */
    //@Test
    public void testModInsumoProveedor() throws Exception {
        System.out.println("modInsumoProveedor");
        InsumoProveedor insumoproveedor = new InsumoProveedor(2, 1, 2, 2, 1.200, "Inactivo");
        InsumoProveedor expResult = MPinsumoProveedor.getInsumoProveedor(2);
        MPinsumoProveedor.modInsumoProveedor(insumoproveedor);
        assertEquals("Inactivo",expResult.getEstado());
        // TODO review the generated test code and remove the default call to fail.
       
    }

    /**
     * Test of listar method, of class MPinsumoProveedor.
     */
    @Test
    public void testListar() throws Exception {
        System.out.println("listar");
        List expResult = null;
        List result = MPinsumoProveedor.listarTodo();
        InsumoProveedor insp = (InsumoProveedor) result.get(0);
        assertEquals(2, insp.getCodigo());
        // TODO review the generated test code and remove the default call to fail.
       
    }
}
TOP

Related Classes of com.comprainsumos.MPersistencia.MPinsumoProveedorTest

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.