jmoordbunit
  • Introduction
  • Overview
    • Creditos
    • Autor
    • Introduccion
    • Porque JmoordbUnit
    • Pasos
  • UnitTest
    • Que es UnitTest
    • Ejemplos
  • UnitView
    • Que es UtilView
    • header
    • DataTable
    • PanelGrid
    • InputText
  • Proyecto EJB
    • Microtestingejb
    • Maven
    • Esquema General
    • Paquetes
    • Provider
    • Entity
    • Repository
    • Converter
    • DataModel
    • Services
    • Construir proyecto
    • BodegaTest
  • Proyecto Web
    • Proyecto
    • Orden de ejecucion
    • Maven pom.xml
    • Test
    • Mock
    • Construir el proyecto
    • Ejecutar el proyecto
    • UberJar
    • Script desde Consola
  • Testing con UnitView
    • Testing con UnitView
    • Formulario
    • SelectOneMenu
    • DataTable
    • RadioButton
    • CheckBox
    • Todos Componentes
    • ColorTest
  • Testing de bases de datos dinámicas
    • Testing
Powered by GitBook
On this page

Was this helpful?

  1. Testing con UnitView

RadioButton

PreviousDataTableNextCheckBox

Last updated 6 years ago

Was this helpful?

  • Componente panelAddRadio requiere una lista de Radio()

  • La clase radio se compone de una lista de items.

Codigo

@Test
    public String radio() {
        try {
            //titulo de la tabla
            List<Color> colorList = colorRepository.findAll();
            Boolean found = unitTest.assertFalse(nameOfMethod(), colorList.isEmpty());
            if (found) {

               unitTest.form();
               unitTest.formTitle("Radio");
              unitTest.panel();

               unitTest.panelAddRadio(Arrays.asList(new Radio("sexo",
                        Arrays.asList(new Item("sexo", "Masculino", "Masculino"),
                                new Item("sexo", "Femenino", "Femenino")))));

             unitTest.panelClose();
              unitTest.formClose();

            } else {
            unitTest.errorMessage("No tiene registros");
            }


        } catch (Exception e) {
            System.out.println(nameOfMethod()+" " + e.getLocalizedMessage());
        }
        return "";
    }