Examples of Survey


Examples of org.jsurveylib.Survey

        assertFalse(cb.isCheckboxOnRight());
    }

    @Test
    public void alwaysAnswered() throws Exception {
        Survey m = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\question\\typecheckboxfiles\\alwaysanswered.xml")));
        CheckboxQuestion cb = (CheckboxQuestion) m.getQuestionByID("cb");
        //even though the checkbox is defined to be mandatory, that doesn't make sense so it should be ignored (mandatory is always false)
        assertTrue(cb.isMandatory());
        assertTrue(cb.isAnswered());    //checkboxes are always answered
    }
View Full Code Here

Examples of org.jsurveylib.Survey

        assertTrue(cb.isAnswered());    //checkboxes are always answered
    }

    @Test
    public void dupe() throws Exception {
        Survey m = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\question\\typecheckboxfiles\\dupe.xml")));
        CheckboxQuestion orig = (CheckboxQuestion) m.getQuestionByID("cb");
        orig.addAnswerListener(this);
        orig.addEnableListener(this);
        orig.addValidationListener(this);
        orig.addVisibilityListener(this);
View Full Code Here

Examples of org.jsurveylib.Survey

    private boolean enChanged = false;
    private boolean valChanged = false;

    @Test
    public void standard() throws Exception {
        Survey m = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\question\\typemultichoicefiles\\standard.xml")));
        m.getQuestionByID("multi").addAnswerListener(this);
        RadioButtonsQuestion multi = (RadioButtonsQuestion) m.getQuestionByID("multi");
        Choice c1 = multi.getChoices().get(0);
        assertEquals("X", c1.getId());
        assertEquals("x", c1.getLabel());

        Choice c2 = multi.getChoices().get(1);
View Full Code Here

Examples of org.jsurveylib.Survey

        }
    }

    @Test
    public void alldefinitions() throws Exception {
        Survey m = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\question\\typemultichoicefiles\\alldefinitions.xml")));
        m.getQuestionByID("multi").addAnswerListener(this);
        RadioButtonsQuestion multi = (RadioButtonsQuestion) m.getQuestionByID("multi");

        Choice c1 = multi.getChoices().get(0);
        assertEquals("X", c1.getId());
        assertEquals("x", c1.getLabel());
View Full Code Here

Examples of org.springframework.data.mongodb.examples.custsvc.domain.Survey

    CustomerRepository customerRepository;

    @RequestMapping(method = RequestMethod.GET)
    public String setupForm(@PathVariable Long id, Model model) {
        Customer customer = customerRepository.findOne(id);
        Survey survey = new Survey();
        model.addAttribute("customer", customer);
        model.addAttribute("survey", survey);
        return "customer/viewCustomerForm";
    }
View Full Code Here
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.