Skip to content

Commit

Permalink
Add unit test for JENKINS-27678
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-pousse committed Mar 31, 2015
1 parent 31b328e commit f2d3fa2
Showing 1 changed file with 7 additions and 12 deletions.
@@ -1,18 +1,9 @@
package org.jvnet.hudson.plugins.repositoryconnector.aether;

import hudson.model.Cause;
import hudson.model.FreeStyleProject;
import hudson.model.Result;
import hudson.tasks.Shell;
import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Test;
import org.jvnet.hudson.plugins.repositoryconnector.Artifact;
import org.jvnet.hudson.plugins.repositoryconnector.ArtifactResolver;

import java.io.File;
import java.io.PrintStream;
import java.util.Collections;

import static org.junit.Assert.assertEquals;

Expand All @@ -21,9 +12,8 @@ public class AetherTest {
private Aether sut;

@Before
public void setup()
{
sut = new Aether( new File("jenkinstest"), System.out, false );
public void setup() {
sut = new Aether(new File("jenkinstest"), System.out, false);
}

@Test
Expand All @@ -33,4 +23,9 @@ public void convertGivenNonHttpProxySettings() throws Exception {

assertEquals("New lines should be replaced", result, "localhost|*.google.com|apple.com");
}

@Test
public void convertGivenNullNonHttpProxySettings() throws Exception {
assertEquals("New lines should be replaced", sut.convertHudsonNonProxyToJavaNonProxy(null), "");
}
}

0 comments on commit f2d3fa2

Please sign in to comment.