Examples of DescriptorImpl


Examples of hudson.plugins.perforce.PerforceToolInstallation.DescriptorImpl

    public void testConfigSaveReloadAndSaveDoesNotDoubleEncryptThePassword() throws Exception {
        FreeStyleProject project = createFreeStyleProject();
        P4Web browser = new P4Web(new URL("http://localhost/"));
        PerforceToolInstallation tool = new PerforceToolInstallation("test_installation", "p4.exe", Collections.<ToolProperty<?>>emptyList());
        DescriptorImpl descriptor = (DescriptorImpl) Hudson.getInstance().getDescriptor(PerforceToolInstallation.class);
        descriptor.setInstallations(new PerforceToolInstallation[] { tool });
        descriptor.save();
        String password = "pass";
        PerforceSCM scm = new PerforceSCM(
            "user", password, "client", "port", "", "test_installation", "sysRoot",
            "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false,
                        false, true, false, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW);
View Full Code Here

Examples of hudson.plugins.perforce.PerforceToolInstallation.DescriptorImpl

     *
     * @throws Exception
     */
    @LocalData
    public void testP4ExeMigration() throws Exception {
        DescriptorImpl descriptor = (DescriptorImpl) Hudson.getInstance().getDescriptor(PerforceToolInstallation.class);
        PerforceToolInstallation[] expected = new PerforceToolInstallation[] {
                new PerforceToolInstallation("c:\\program files\\perforce\\p4.exe", "c:\\program files\\perforce\\p4.exe", Collections.<ToolProperty<?>>emptyList()),
                new PerforceToolInstallation("p4.exe", "p4.exe", Collections.<ToolProperty<?>>emptyList())
        };
        assertEquals(expected, descriptor.getInstallations());
    }
View Full Code Here

Examples of hudson.plugins.perforce.PerforceToolInstallation.DescriptorImpl

   
    public void testDepotContainsUnencryptedPasswordWithgetProperty() throws Exception {
        FreeStyleProject project = createFreeStyleProject();
        P4Web browser = new P4Web(new URL("http://localhost/"));
        PerforceToolInstallation tool = new PerforceToolInstallation("test_installation", "p4.exe", Collections.<ToolProperty<?>>emptyList());
        DescriptorImpl descriptor = (DescriptorImpl) Hudson.getInstance().getDescriptor(PerforceToolInstallation.class);
        descriptor.setInstallations(new PerforceToolInstallation[] { tool });
        descriptor.save();
        String password = "pass";
        PerforceSCM scm = new PerforceSCM(
                "user", password, "client", "port", "", "test_installation", "sysRoot",
                "sysDrive", "label", "counter", "upstreamProject", "shared", "charset", "charset2", "user", false, true, true, true, true, true, false,
                        false, false, true, false, false, "${basename}", 0, -1, browser, "exclude_user", "exclude_file", true, EMPTY_DEPOT, EMPTY_WORKSPACE_CLEANUP, EMPTY_MASKVIEW);
View Full Code Here

Examples of hudson.tasks.Mailer.DescriptorImpl

        // this allows tests to use a part of the URL space for itself.
        hudson.getActions().add(this);

        // cause all the descriptors to reload.
        // ideally we'd like to reset them to properly emulate the behavior, but that's not possible.
        DescriptorImpl desc = Mailer.descriptor();
        // prevent NPE with eclipse
        if (desc != null) Mailer.descriptor().setHudsonUrl(null);
        for( Descriptor d : hudson.getExtensionList(Descriptor.class) )
            d.load();
View Full Code Here

Examples of hudson.tasks.Mailer.DescriptorImpl

    }

    public Mailbox runMailTest(boolean perModuleEamil) throws Exception {

        final DescriptorImpl mailDesc = Jenkins.getInstance().getDescriptorByType(Mailer.DescriptorImpl.class);

        // intentionally give the whole thin in a double quote
        Mailer.descriptor().setAdminAddress("\"me <me@sun.com>\"");

        String recipient = "you <you@sun.com>";
View Full Code Here

Examples of hudson.tasks.Mailer.DescriptorImpl

        assertNotSame(before,after);
        assertEqualBeans(before,after,"recipients,dontNotifyEveryUnstableBuild,sendToIndividuals");
    }

    public void testGlobalConfigRoundtrip() throws Exception {
        DescriptorImpl d = Mailer.descriptor();
        d.setAdminAddress("admin@me");
        d.setDefaultSuffix("default-suffix");
        d.setHudsonUrl("http://nowhere/");
        d.setSmtpHost("smtp.host");
        d.setSmtpPort("1025");
        d.setUseSsl(true);
        d.setSmtpAuth("user","pass");

        submit(new WebClient().goTo("configure").getFormByName("config"));

        assertEquals("admin@me",d.getAdminAddress());
        assertEquals("default-suffix",d.getDefaultSuffix());
        assertEquals("http://nowhere/",d.getUrl());
        assertEquals("smtp.host",d.getSmtpServer());
        assertEquals("1025",d.getSmtpPort());
        assertEquals(true,d.getUseSsl());
        assertEquals("user",d.getSmtpAuthUserName());
        assertEquals("pass",d.getSmtpAuthPassword());

        d.setUseSsl(false);
        d.setSmtpAuth(null,null);
        submit(new WebClient().goTo("configure").getFormByName("config"));
        assertEquals(false,d.getUseSsl());
        assertNull("expected null, got: " + d.getSmtpAuthUserName(), d.getSmtpAuthUserName());
        assertNull("expected null, got: " + d.getSmtpAuthPassword(), d.getSmtpAuthPassword());
    }
View Full Code Here

Examples of hudson.tools.JDKInstaller.DescriptorImpl

                String u = prop.getProperty("oracle.userName");
                String p = prop.getProperty("oracle.password");
                if (u==null || p==null) {
                    LOGGER.warning(f+" doesn't contain oracle.userName and oracle.password. Skipping JDK installation tests.");
                } else {
                    DescriptorImpl d = jenkins.getDescriptorByType(DescriptorImpl.class);
                    d.doPostCredential(u,p);
                }
            } finally {
                in.close();
            }
        }
View Full Code Here

Examples of hudson.tools.JDKInstaller.DescriptorImpl

        HtmlForm form = p.getFormByName("postCredential");
        form.getInputByName("username").setValueAttribute("foo");
        form.getInputByName("password").setValueAttribute("bar");
        form.submit(null);

        DescriptorImpl d = jenkins.getDescriptorByType(DescriptorImpl.class);
        assertEquals("foo",d.getUsername());
        assertEquals("bar",d.getPassword().getPlainText());
    }
View Full Code Here

Examples of hudson.util.FormFieldValidatorTest.BrokenFormValidatorBuilder.DescriptorImpl

    /**
     * Make sure that the validation methods are really called by testing a negative case.
     */
    @Bug(3382)
    public void testNegative() throws Exception {
        DescriptorImpl d = new DescriptorImpl();
        Publisher.all().add(d);
        try {
            FreeStyleProject p = createFreeStyleProject();
            p.getPublishersList().add(new BrokenFormValidatorBuilder());
            new WebClient().getPage(p,"configure");
View Full Code Here

Examples of org.glassfish.hk2.utilities.DescriptorImpl

        injectionMgr.inject(result, injector);
        return result;
    }
   
    private void parseInHk2LocatorOrig(BufferedReader reader, Map<String, String> cliCommandNames) throws IOException {
        DescriptorImpl desc = new DescriptorImpl();
        while (desc.readObject(reader)) {
            if (StringUtils.ok(desc.getName()) && desc.getAdvertisedContracts().contains(CLICommand.class.getName())) {
                cliCommandNames.put(desc.getName(), desc.getImplementation());
            }
        }
    }
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.