|
1 | 1 | package osm.util; |
2 | 2 |
|
3 | | -import org.apache.commons.cli.ParseException; |
4 | 3 | import org.junit.jupiter.api.Assertions; |
5 | 4 | import org.junit.jupiter.api.Test; |
6 | 5 | import util.Config; |
7 | 6 |
|
8 | | -import java.io.IOException; |
9 | 7 |
|
10 | 8 | public class OpenSenseMapHandlerTest { |
11 | 9 |
|
12 | 10 | @Test |
13 | | - public void testHandleConfigWithSenseBox() throws ParseException, IOException { |
| 11 | + public void testHandleConfigWithSenseBox() { |
14 | 12 | String[] args = new String[]{ |
15 | 13 | "-osm", "5cc58071facf70001a872bef", |
| 14 | + "-path", "file.out" |
16 | 15 | }; |
17 | 16 |
|
18 | 17 | Assertions.assertDoesNotThrow(() -> new OpenSenseMapHandler().handleConfig(new Config().parseArgs(args))); |
19 | 18 | } |
20 | 19 |
|
21 | 20 | @Test |
22 | | - public void testHandleConfigWithMeasurements() throws ParseException, IOException { |
| 21 | + public void testHandleConfigWithMeasurements() { |
23 | 22 | String[] args = new String[]{ |
24 | 23 | "-osm", "5cc58071facf70001a872bef", |
25 | 24 | "-measurements", |
26 | | - "-timerange", "2019-05-01T00:00:00.000Z", "2019-05-15T00:00:00.000Z" |
| 25 | + "-timerange", "2019-05-01T00:00:00.000Z", "2019-05-15T00:00:00.000Z", |
| 26 | + "-path", "file.out" |
27 | 27 | }; |
28 | 28 |
|
29 | 29 | Assertions.assertDoesNotThrow(() -> new OpenSenseMapHandler().handleConfig(new Config().parseArgs(args))); |
30 | 30 | } |
31 | 31 |
|
32 | 32 | @Test |
33 | | - public void testHandleConfigWithLocations() throws ParseException, IOException { |
| 33 | + public void testHandleConfigWithLocations() { |
34 | 34 | String[] args = new String[]{ |
35 | 35 | "-osm", "5cc58071facf70001a872bef", |
36 | 36 | "-locations", |
37 | | - "-timerange", "2019-05-01T00:00:00.000Z", "2019-05-15T00:00:00.000Z" |
| 37 | + "-timerange", "2019-05-01T00:00:00.000Z", "2019-05-15T00:00:00.000Z", |
| 38 | + "-path", "file.out" |
38 | 39 | }; |
39 | 40 |
|
40 | 41 | Assertions.assertDoesNotThrow(() -> new OpenSenseMapHandler().handleConfig(new Config().parseArgs(args))); |
|
0 commit comments