// Path: src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobParametersAction.java
// @Restricted(NoExternalUse.class)
// public class MultiJobParametersAction extends ParametersAction {
// 
//     private List<ParameterValue> parameters;
// 
//     public MultiJobParametersAction(@Nonnull List<ParameterValue> parameters) {
//         super(parameters);
//         this.parameters = parameters;
//     }
// 
//     public MultiJobParametersAction(ParameterValue... parameters) {
//         this(Arrays.asList(parameters));
//     }
// 
//     @Override
//     public List<ParameterValue> getParameters() {
//         return Collections.unmodifiableList(parameters);
//     }
// 
//     @Override
//     public ParameterValue getParameter(String name) {
//         for (ParameterValue parameter : parameters) {
//             if (parameter != null && parameter.getName().equals(name)) {
//                 return parameter;
//             }
//         }
// 
//         return null;
//     }
// 
//     @Extension
//     public static final class MultiJobParametersActionEnvironmentContributor extends EnvironmentContributor {
// 
//         @Override
//         public void buildEnvironmentFor(@Nonnull Run r, @Nonnull EnvVars envs, @Nonnull TaskListener listener) throws IOException, InterruptedException {
//             MultiJobParametersAction action = r.getAction(MultiJobParametersAction.class);
//             if (action != null) {
//                 for (ParameterValue p : action.getParameters()) {
//                     envs.putIfNotNull(p.getName(), String.valueOf(p.getValue()));
//                 }
//             }
//         }
//     }
// }


import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import com.tikal.jenkins.plugins.multijob.MultiJobParametersAction;
import hudson.model.Action;
import hudson.model.ParameterValue;
import hudson.model.ParametersAction;
import hudson.model.StringParameterValue;
import java.util.Collections;
import org.junit.Assert;
/*
 * The MIT License
 * 
 * Copyright (c) 2017 CloudBees, Inc.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package com.tikal.jenkins.plugins.multijob.test;


/**
 * Tests for {@link MultiJobParametersAction}
 * @author Oleg Nenashev
 */
public class MultiJobParametersActionTest {
    
    @Test
    public void shouldMergeEmptyParameters() {
// Path: src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobParametersAction.java
// @Restricted(NoExternalUse.class)
// public class MultiJobParametersAction extends ParametersAction {
// 
//     private List<ParameterValue> parameters;
// 
//     public MultiJobParametersAction(@Nonnull List<ParameterValue> parameters) {
//         super(parameters);
//         this.parameters = parameters;
//     }
// 
//     public MultiJobParametersAction(ParameterValue... parameters) {
//         this(Arrays.asList(parameters));
//     }
// 
//     @Override
//     public List<ParameterValue> getParameters() {
//         return Collections.unmodifiableList(parameters);
//     }
// 
//     @Override
//     public ParameterValue getParameter(String name) {
//         for (ParameterValue parameter : parameters) {
//             if (parameter != null && parameter.getName().equals(name)) {
//                 return parameter;
//             }
//         }
// 
//         return null;
//     }
// 
//     @Extension
//     public static final class MultiJobParametersActionEnvironmentContributor extends EnvironmentContributor {
// 
//         @Override
//         public void buildEnvironmentFor(@Nonnull Run r, @Nonnull EnvVars envs, @Nonnull TaskListener listener) throws IOException, InterruptedException {
//             MultiJobParametersAction action = r.getAction(MultiJobParametersAction.class);
//             if (action != null) {
//                 for (ParameterValue p : action.getParameters()) {
//                     envs.putIfNotNull(p.getName(), String.valueOf(p.getValue()));
//                 }
//             }
//         }
//     }
// }


// Path: src/test/java/com/tikal/jenkins/plugins/multijob/test/MultiJobParametersActionTest.java
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import com.tikal.jenkins.plugins.multijob.MultiJobParametersAction;
import hudson.model.Action;
import hudson.model.ParameterValue;
import hudson.model.ParametersAction;
import hudson.model.StringParameterValue;
import java.util.Collections;
import org.junit.Assert;

/*
 * The MIT License
 * 
 * Copyright (c) 2017 CloudBees, Inc.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package com.tikal.jenkins.plugins.multijob.test;


/**
 * Tests for {@link MultiJobParametersAction}
 * @author Oleg Nenashev
 */
public class MultiJobParametersActionTest {
    
    @Test
    public void shouldMergeEmptyParameters() {
        MultiJobParametersAction params = new MultiJobParametersAction();