|
1 | 1 | package com.dampcake.bencode; |
2 | 2 |
|
3 | | -import org.junit.AfterClass; |
4 | 3 | import org.junit.Before; |
5 | 4 | import org.junit.Test; |
6 | | -import org.junit.runner.RunWith; |
7 | | -import org.junit.runners.Parameterized; |
8 | 5 |
|
9 | 6 | import java.io.ByteArrayOutputStream; |
10 | 7 | import java.util.ArrayList; |
11 | | -import java.util.Collection; |
12 | 8 | import java.util.HashMap; |
13 | | -import java.util.LinkedList; |
14 | | -import java.util.Locale; |
15 | 9 | import java.util.concurrent.ConcurrentSkipListMap; |
16 | 10 |
|
17 | 11 | import static com.dampcake.bencode.Assert.assertThrows; |
|
22 | 16 | * |
23 | 17 | * @author Adam Peck |
24 | 18 | */ |
25 | | -@RunWith(Parameterized.class) |
26 | 19 | public class BencodeOutputStreamTest { |
27 | 20 |
|
28 | | - private static Locale startLocale = Locale.getDefault(); |
29 | | - |
30 | | - @Parameterized.Parameter |
31 | | - public Locale testLocale; |
32 | | - |
33 | | - @AfterClass |
34 | | - public static void restore() throws Exception { |
35 | | - Locale.setDefault(startLocale); |
36 | | - } |
37 | | - |
38 | | - @Parameterized.Parameters(name = "{index}: {0}") |
39 | | - public static Collection<Object[]> data() { |
40 | | - LinkedList<Object[]> res = new LinkedList<Object[]>(); |
41 | | - for (Locale locale : Locale.getAvailableLocales()) { |
42 | | - res.add(new Object[] {locale}); |
43 | | - } |
44 | | - return res; |
45 | | - } |
46 | | - |
47 | 21 | private ByteArrayOutputStream out; |
48 | 22 | private BencodeOutputStream instance; |
49 | 23 |
|
50 | 24 | @Before |
51 | 25 | public void setUp() { |
52 | | - Locale.setDefault(testLocale); |
53 | | - |
54 | 26 | out = new ByteArrayOutputStream(); |
55 | 27 | instance = new BencodeOutputStream(out); |
56 | 28 | } |
|
0 commit comments