Package org.netbeans.server.uihandler.api

Examples of org.netbeans.server.uihandler.api.Submit$Attachment


        metadata.setDescription(data.getDescription());
        metadata.setFileName(data.getFileName());
        metadata.setMimeType(data.getMimeType());
        metadata.setTitle(data.getTitle());

        Attachment att = (Attachment) Attachment.Factory.newInstance();
        att.setAttachmentMetadata(metadata);
        att.setPayloadUrl(attachment.getPayloadURL().toString());
        return att;
    }
View Full Code Here


        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("cat ", ReporterUtils.prepareMessagePrefix(sbm));
    }

    public void testPrepareWithEmptyMessagePrefix() {
        Submit sbm = prepareDuplicatesData();
        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("", ReporterUtils.prepareMessagePrefix(sbm));

        MockSubmit dup1 = (MockSubmit) sbm.getDuplicates().iterator().next();
        dup1.setReporter(new Submit.Reporter("user2", true, ""));

        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("Ignore empty prefix", "", ReporterUtils.prepareMessagePrefix(sbm));

        List<Submit> duplicates = (List)sbm.getDuplicates();
        MockSubmit du = (MockSubmit) duplicates.get(duplicates.size() - 1);
        du.setReporter(new Submit.Reporter("user9", true, "cat"));

        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("cat ", ReporterUtils.prepareMessagePrefix(sbm));
View Full Code Here

        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("cat ", ReporterUtils.prepareMessagePrefix(sbm));
    }

    public void testPrepareWithNullMessagePrefix() {
        Submit sbm = prepareDuplicatesData();
        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("", ReporterUtils.prepareMessagePrefix(sbm));

        MockSubmit dup1 = (MockSubmit) sbm.getDuplicates().iterator().next();
        dup1.setReporter(new Submit.Reporter("user2", true, null));

        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("Ignore empty prefix", "", ReporterUtils.prepareMessagePrefix(sbm));
    }
View Full Code Here

        assertNotNull(ReporterUtils.prepareMessagePrefix(sbm));
        assertEquals("Ignore empty prefix", "", ReporterUtils.prepareMessagePrefix(sbm));
    }

    public void testGetCCUsersList() {
        Submit sbm = prepareDuplicatesData();

        String result = ReporterUtils.getCCUsersList(sbm, null);
        assertNotNull(result);
        assertFalse("reporter should not be on the list: " + result, result.contains("user1@testnetbeans.org"));
View Full Code Here

TOP

Related Classes of org.netbeans.server.uihandler.api.Submit$Attachment

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.