Examples of Keywords


Examples of org.jbehave.core.configuration.Keywords

public class PlayersCanHazTurns extends NoughtsAndCrossesStory {
    public PlayersCanHazTurns() {       
        ClassLoader classLoader = this.getClass().getClassLoader();
        URL codeLocation = CodeLocations.codeLocationFromClass(this.getClass());
        Keywords keywords = new LocalizedKeywords(new Locale("lc"),
                "i18n/keywords", classLoader);
        Configuration configuration = new MostUsefulConfiguration()
            .useKeywords(keywords)
            .useStoryParser(new RegexStoryParser(keywords))
            .useStoryPathResolver(new UnderscoredCamelCaseResolver(""))
View Full Code Here

Examples of org.jbehave.core.configuration.Keywords

    }

    @Test
    public void shouldNotMatchOrIgnoreStepWhenStartingWordNotFound() throws Exception {
        Method method = SomeSteps.class.getMethod("aMethod");
        Keywords keywords = new LocalizedKeywords(){           
           
            @Override
            public String startingWordFor(StepType stepType) {
                throw new StartingWordNotFound(stepType, new HashMap<StepType, String>());
            }
View Full Code Here

Examples of org.jbehave.core.configuration.Keywords

                new StoryReporterBuilder() {
                    public StoryReporter reporterFor(String storyPath, org.jbehave.core.reporters.Format format) {
                        if (format.equals(org.jbehave.core.reporters.Format.HTML)) {
//                            return new JiraStoryReporter(jiraUrl, jiraProject, "admin", "admin", environment);
//                            return new GroovyStoryReporter(jiraUrl, jiraProject, "admin", "admin", environment);
                            Keywords keywords = keywords();
                            return new JiraStoryReporter(new File("target", "story_report.xml"), keywords,
                                    jiraUrl, jiraProject, "admin", "admin", environment);
                        } else {
                            return super.reporterFor(storyPath, format);
                        }
View Full Code Here

Examples of org.opensaml.samlext.saml2mdui.Keywords

    /**
     * {@inheritDoc}
     */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        Keywords words = (Keywords) samlObject;

        if (words.getXMLLang() != null) {
            Attr attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), SAMLConstants.XML_NS,
                    LangBearing.XML_LANG_ATTR_LOCAL_NAME, SAMLConstants.XML_PREFIX);
            attribute.setValue(words.getXMLLang());
            domElement.setAttributeNodeNS(attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.samlext.saml2mdui.Keywords

        }
    }

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
        Keywords words = (Keywords) samlObject;

        if (words.getKeywords() != null) {
            StringBuilder sb = new StringBuilder();
            for (String s : words.getKeywords()) {
                sb.append(s);
                sb.append(' ');
            }
            XMLHelper.appendTextContent(domElement, sb.toString());
        }
View Full Code Here

Examples of org.opensaml.samlext.saml2mdui.Keywords

     * {@inheritDoc}
     */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        if (attribute.getLocalName().equals(LangBearing.XML_LANG_ATTR_LOCAL_NAME)
                && SAMLConstants.XML_NS.equals(attribute.getNamespaceURI())) {
            Keywords keywords = (Keywords) samlObject;

            keywords.setXMLLang(attribute.getValue());
        }
    }
View Full Code Here

Examples of org.opensaml.samlext.saml2mdui.Keywords

        }
    }

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        Keywords keywords = (Keywords) samlObject;
        String[] words = elementContent.split("\\s+");
        ArrayList<String> wordlist = new ArrayList<String>(words.length);
       
        for (String s : words) {
            wordlist.add(s);
        }

        keywords.setKeywords(wordlist);
    }
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.