blob: d0cc83182af91b6f31dc6c190e3e89ed5d7dd8fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/**
*
*/
package org.onap.ccsdk.sli.core.sli.recording;
import static org.junit.Assert.fail;
import java.util.HashMap;
import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
/**
* @author dt5972
*
*/
public class TestFileRecorder {
private FileRecorder recorder;
@Before
public void setUp() {
recorder = new FileRecorder();
}
/**
* Test method for
* {@link org.onap.ccsdk.sli.core.sli.recording.FileRecorder#record(java.util.Map)}.
*/
@Test
public void testRecord() {
HashMap<String, String> parms = new HashMap<>();
parms.put("file", "/dev/null");
parms.put("field1", "hi");
try {
recorder.record(parms);
} catch (SvcLogicException e) {
fail("Caught SvcLogicException : " + e.getMessage());
}
}
@Test(expected = Exception.class)
public void testRecordForEmptyFileName() throws Exception {
HashMap<String, String> parms = new HashMap<>();
parms.put("field1", "hi");
recorder.record(parms);
}
}
|