Search in sources :

Example 1 with ToolProperty

use of hudson.tools.ToolProperty in project nodejs-plugin by jenkinsci.

the class SimpleNodeJSCommandInterpreterTest method setUp.

@Before
public void setUp() {
    installation = new NodeJSInstallation("11.0.0", "", Collections.<ToolProperty<?>>emptyList());
    interpreter = new NodeJSCommandInterpreter(COMMAND, installation.getName(), null);
    descriptor = new NodeJSCommandInterpreter.NodeJsDescriptor();
}
Also used : NodeJSInstallation(jenkins.plugins.nodejs.tools.NodeJSInstallation) ToolProperty(hudson.tools.ToolProperty) Before(org.junit.Before)

Example 2 with ToolProperty

use of hudson.tools.ToolProperty in project nodejs-plugin by jenkinsci.

the class NodeJSInstallationTest method verify.

private void verify() throws Exception {
    NodeJSInstallation[] l = r.get(DescriptorImpl.class).getInstallations();
    assertEquals(1, l.length);
    r.assertEqualBeans(l[0], new NodeJSInstallation("myNode", "/tmp/foo", JenkinsRule.NO_PROPERTIES), "name,home");
    // by default we should get the auto installer
    DescribableList<ToolProperty<?>, ToolPropertyDescriptor> props = l[0].getProperties();
    assertEquals(1, props.size());
    InstallSourceProperty isp = props.get(InstallSourceProperty.class);
    assertEquals(1, isp.installers.size());
    assertNotNull(isp.installers.get(NodeJSInstaller.class));
}
Also used : DescriptorImpl(jenkins.plugins.nodejs.tools.NodeJSInstallation.DescriptorImpl) InstallSourceProperty(hudson.tools.InstallSourceProperty) ToolPropertyDescriptor(hudson.tools.ToolPropertyDescriptor) ToolProperty(hudson.tools.ToolProperty)

Aggregations

ToolProperty (hudson.tools.ToolProperty)2 InstallSourceProperty (hudson.tools.InstallSourceProperty)1 ToolPropertyDescriptor (hudson.tools.ToolPropertyDescriptor)1 NodeJSInstallation (jenkins.plugins.nodejs.tools.NodeJSInstallation)1 DescriptorImpl (jenkins.plugins.nodejs.tools.NodeJSInstallation.DescriptorImpl)1 Before (org.junit.Before)1