1
|
/*
|
2
|
* To change this template, choose Tools | Templates
|
3
|
* and open the template in the editor.
|
4
|
*/
|
5
|
package eu.espas.carbon.pip;
|
6
|
|
7
|
import java.net.URI;
|
8
|
import java.util.Properties;
|
9
|
import java.util.Set;
|
10
|
import junit.framework.TestCase;
|
11
|
import org.apache.log4j.Logger;
|
12
|
|
13
|
/**
|
14
|
*
|
15
|
* @author gathanas
|
16
|
*/
|
17
|
public class EspasAttributeFinderTest extends TestCase {
|
18
|
|
19
|
public EspasAttributeFinderTest(String testName) {
|
20
|
super(testName);
|
21
|
}
|
22
|
|
23
|
public void testInit() {
|
24
|
try {
|
25
|
System.out.println("init");
|
26
|
Properties properties = new Properties();
|
27
|
properties.put("espas.db.url", "jdbc:postgresql://dl121.madgik.di.uoa.gr/dnet_espas_v2");
|
28
|
properties.put("espas.db.user", "dnet");
|
29
|
properties.put("espas.db.passwd", "dnetPwd");
|
30
|
|
31
|
EspasAttributeFinder instance = new EspasAttributeFinder();
|
32
|
instance.init(properties);
|
33
|
// TODO review the generated test code and remove the default call to fail.
|
34
|
assert true;
|
35
|
} catch (Exception ex) {
|
36
|
Logger.getLogger(EspasAttributeFinderTest.class).error("Exception in test initialization", ex);
|
37
|
assert true;
|
38
|
}
|
39
|
}
|
40
|
|
41
|
/* public void testGetAttributeValues() throws Exception {
|
42
|
System.out.println("getAttributeValues");
|
43
|
String subjectId = "";
|
44
|
String resourceId = "";
|
45
|
String actionId = "";
|
46
|
String environmentId = "";
|
47
|
String attributeId = "";
|
48
|
URI issuer = null;
|
49
|
EspasAttributeFinder instance = new EspasAttributeFinder();
|
50
|
Set expResult = null;
|
51
|
Set result = instance.getAttributeValues(subjectId, resourceId, actionId, environmentId, attributeId, issuer);
|
52
|
assertEquals(expResult, result);
|
53
|
// TODO review the generated test code and remove the default call to fail.
|
54
|
fail("The test case is a prototype.");
|
55
|
}
|
56
|
|
57
|
public void testGetSupportedAttributes() {
|
58
|
System.out.println("getSupportedAttributes");
|
59
|
EspasAttributeFinder instance = new EspasAttributeFinder();
|
60
|
Set expResult = null;
|
61
|
Set result = instance.getSupportedAttributes();
|
62
|
assertEquals(expResult, result);
|
63
|
// TODO review the generated test code and remove the default call to fail.
|
64
|
fail("The test case is a prototype.");
|
65
|
}
|
66
|
*/
|
67
|
}
|