mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
Replacing Util.createTempDir with the standard TemporaryFolder rule in some tests.
This commit is contained in:
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());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user