Package org.springmodules.xt.test.domain

Examples of org.springmodules.xt.test.domain.Employee


        assertXpathEvaluatesTo("data1", "/tr/td[position() = 1]/span", rendering);
        assertXpathEvaluatesTo("data2", "/tr/td[position() = 2]/span", rendering);
    }
   
    public void testTableRowConstructor2() throws Exception {
        Employee emp = new Employee();
        emp.setMatriculationCode("123");
        emp.setFirstname("Sergio");
        emp.setSurname("Bossa");
       
        TableRow tableRow = new TableRow(emp, new String[]{"matriculationCode", "firstname", "surname"}, null);
       
        String rendering = tableRow.render();
        System.out.println(rendering);
View Full Code Here


       
        assertXpathEvaluatesTo("test", "/th/span", rendering);
    }
   
    public void testRenderPart2() throws Exception {
        Employee emp = new Employee();
        emp.setMatriculationCode("123");
       
        TableHeaderData tableData = new TableHeaderData(emp, "matriculationCode", null);
       
        String rendering = tableData.render();
        System.out.println(rendering);
View Full Code Here

       
        assertXpathEvaluatesTo("123", "/th", rendering);
    }
   
    public void testRenderPart3() throws Exception {
        Employee emp = new Employee();
       
        // Matriculation code is null:
        TableHeaderData tableData = new TableHeaderData(emp, "matriculationCode", null);
        String rendering = tableData.render();
       
View Full Code Here

    public DefaultErrorRenderingCallbackTest(String testName) {
        super(testName);
    }
   
    protected void setUp() throws Exception {
        IEmployee target = new Employee();
       
        this.callback = new DefaultErrorRenderingCallback();   
        this.errors = new BindException(target, "command");
        this.errors.addError(new ObjectError("command", new String[]{"ErrorCode1"}, null, "Default Message 1"));
        this.messageSource = new DelegatingMessageSource();
View Full Code Here

    }

    protected void setUp() throws Exception {
        this.office = new Office();
       
        Employee employee = new Employee();
        employee.setFirstname("Sergio");
        employee.setSurname("Bossa");
        employee.setMatriculationCode("abc");
       
        this.office.addEmployee(employee);
    }
View Full Code Here

    }
   
    public void testGetStatusValueWithPropertyEditor() {
        PropertyEditor editor = new PropertyEditorSupport() {
           public String getAsText() {
               Employee emp = (Employee) this.getValue();
               return emp.getFirstname() + " " + emp.getSurname();
          
        };
        BindStatusHelper helper = new BindStatusHelper("office.employees[0]", this.office);
        helper.setPropertyEditor(editor);
        assertEquals("Sergio Bossa", helper.getStatusValue());
View Full Code Here

       
        assertXpathEvaluatesTo("test", "/td/span", rendering);
    }
   
    public void testRenderPart2() throws Exception {
        Employee emp = new Employee();
        emp.setMatriculationCode("123");
       
        TableData tableData = new TableData(emp, "matriculationCode", null);
       
        String rendering = tableData.render();
        System.out.println(rendering);
View Full Code Here

       
        assertXpathEvaluatesTo("123", "/td", rendering);
    }
   
    public void testRenderPart3() throws Exception {
        Employee emp = new Employee();
       
        // Matriculation code is null:
        TableData tableData = new TableData(emp, "matriculationCode", null);
        String rendering = tableData.render();
       
View Full Code Here

        super(testName);
    }
   
    protected void setUp() throws Exception {
        MockHttpServletRequest request = new MockHttpServletRequest();
        IEmployee target = new Employee();
       
        this.errors = new BindException(target, "command");
        this.errors.addError(new ObjectError("command", new String[]{"ErrorCode1"}, null, "Default Message 1"));
       
        this.submitEvent = new AjaxSubmitEventImpl("submitEvent", request);
View Full Code Here

        AvailableOfficeSpecification spec = new AvailableOfficeSpecification();
        CompositeSpecification<BaseSpecification, IOffice> composite = new CompositeSpecificationImpl<BaseSpecification, IOffice>(BaseSpecification.class, "isSatisfiedBy");
        PredicateCompositeAdapter adapter = new PredicateCompositeAdapter(composite);
       
        IOffice office1 = new Office();
        IEmployee emp1 = new Employee();
       
        office1.setOfficeId("o1");
        emp1.setMatriculationCode("1");
        office1.addEmployee(emp1);
       
        composite.compose(spec);
        assertTrue(composite.evaluate(office1));
        assertTrue(adapter.evaluate(office1));
View Full Code Here

TOP

Related Classes of org.springmodules.xt.test.domain.Employee

Copyright © 2018 www.massapicom. 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.