Package org.elasticsearch.client.transport

Examples of org.elasticsearch.client.transport.InternalTransportClientTests$TestAction


        return new MultiPartRequestWrapper(jak, req, tempDir.getAbsolutePath(), new DefaultLocaleProvider());
    }

    protected void setUp() throws Exception {
        super.setUp();
        action = new TestAction();
        interceptor = new FileUploadInterceptor();
        container.inject(interceptor);
        tempDir = File.createTempFile("struts", "fileupload");
        tempDir.delete();
        tempDir.mkdirs();
View Full Code Here


    }

    public String intercept(ActionInvocation invocation) throws Exception {
        Assert.assertTrue(invocation.getAction() instanceof TestAction);

        TestAction testAction = (TestAction) invocation.getAction();

        Assert.assertEquals("bar", testAction.getFoo());

        String result = invocation.invoke();

        return result;
    }
View Full Code Here

    }

     public void testActionErrorsEscape() throws Exception {

        ActionErrorTag tag = new ActionErrorTag();
        TestAction testAction = new TestAction();
        testAction.addActionError("<p>hey</p>");
        stack.pop();
        stack.push(testAction);
        tag.setEscape(true);
        tag.setPageContext(pageContext);
        tag.doStartTag();
View Full Code Here

    }

    public void testActionErrorsDontEscape() throws Exception {

        ActionErrorTag tag = new ActionErrorTag();
        TestAction testAction = new TestAction();
        testAction.addActionError("<p>hey</p>");
        stack.pop();
        stack.push(testAction);
        tag.setEscape(false);
        tag.setPageContext(pageContext);
        tag.doStartTag();
View Full Code Here

        DivTag tag = new DivTag();
        verifyGenericProperties(tag, "xhtml", new String[]{"value","tabindex","disabled"});
    }

    public void testSimple() throws Exception {
        TestAction testAction = (TestAction) action;
        testAction.setFoo("bar");

        DivTag tag = new DivTag();
        tag.setPageContext(pageContext);
        tag.setId("mylabel");
        tag.doStartTag();
View Full Code Here

        verifyResource("Anchor-3.txt");
    }

    private void createAction() {
        TestAction testAction = (TestAction) action;
        testAction.setFoo("bar");
    }
View Full Code Here

        prepareTagGeneric(tag);
        verifyGenericProperties(tag, "xhtml", null);
    }

    private void prepareTagGeneric(ComboBoxTag tag) {
        TestAction testAction = (TestAction) action;
        ArrayList collection = new ArrayList();
        collection.add("foo");
        collection.add("bar");
        collection.add("baz");

        testAction.setCollection(collection);

        tag.setList("collection");
    }
View Full Code Here

        tag.setList("collection");
    }

    public void testSimple() throws Exception {
        TestAction testAction = (TestAction) action;
        testAction.setFoo("hello");

        ArrayList collection = new ArrayList();
        collection.add("foo");
        collection.add("bar");
        collection.add("baz");
        testAction.setCollection(collection);

        ComboBoxTag tag = new ComboBoxTag();
        tag.setPageContext(pageContext);
        tag.setLabel("mylabel");
        tag.setName("foo");
View Full Code Here

        verify(ComboBoxTag.class.getResource("ComboBox-1.txt"));
    }

    public void testWithEmptyOptionAndHeader() throws Exception {
        TestAction testAction = (TestAction) action;
        testAction.setFoo("banana");

        List l = new ArrayList();
        l.add("apple");
        l.add("banana");
        l.add("pineaple");
        l.add("grapes");
        testAction.setCollection(l);

        ComboBoxTag tag = new ComboBoxTag();
        tag.setPageContext(pageContext);
        tag.setLabel("My Favourite Fruit");
        tag.setName("myFavouriteFruit");
View Full Code Here

        verify(ComboBoxTag.class.getResource("ComboBox-2.txt"));
    }

    public void testWithMap() throws Exception {
        TestAction testAction = (TestAction) action;
        testAction.setFoo("banana");

        Map m = new LinkedHashMap();
        m.put("apple", "apple");
        m.put("banana", "banana");
        m.put("pineaple", "pineaple");
        m.put("grapes", "grapes");
        testAction.setMap(m);

        ComboBoxTag tag = new ComboBoxTag();
        tag.setPageContext(pageContext);
        tag.setLabel("My Favourite Fruit");
        tag.setName("myFavouriteFruit");
View Full Code Here

TOP

Related Classes of org.elasticsearch.client.transport.InternalTransportClientTests$TestAction

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.