Replacing Util.createTempDir with the standard TemporaryFolder rule in some tests.

This commit is contained in:
Jesse Glick committed 2014-12-17 15:04:45 -05:00
1 parent 89cdd5113f
commit b415b467fb
6 files changed
+38 -31

No files matched your search

@@ -27,14 +27,17 @@ package hudson;
import org.apache.tools.ant.filters.StringInputStream;
import org.junit.Test;
import java.io.File;
import static org.junit.Assert.*;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
public class PluginManagerTest {
@Rule public TemporaryFolder tmp = new TemporaryFolder();
@Test public void parseRequestedPlugins() throws Exception {
assertEquals("{other=2.0, stuff=1.2}", new LocalPluginManager(Util.createTempDir())
assertEquals("{other=2.0, stuff=1.2}", new LocalPluginManager(tmp.getRoot())
.parseRequestedPlugins(new StringInputStream("<root><stuff plugin='stuff@1.0'><more plugin='other@2.0'><things plugin='stuff@1.2'/></more></stuff></root>")).toString());
}