Skip to content

Commit d0f9373

Browse files
committed
Fix broken tests after junit upgrade.
1 parent cbc7864 commit d0f9373

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

core/src/test/java/org/biojavax/SimpleNamespaceTest.java

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,27 @@ public void testSetURI() throws URISyntaxException{
116116
*/
117117
public void testGetAcronym() {
118118
System.out.println("testGetAcronym");
119-
//System.out.println(ns.getAcronym());
120-
//should be set because of retreival from the LRU cache
121-
assertEquals(acronym, ns.getAcronym());
119+
120+
try{
121+
ns.setAcronym(acronym);
122+
assertEquals(acronym, ns.getAcronym());
123+
}catch(ChangeVetoException ex){
124+
fail("Was not expecting "+ex.getClass().getName());
125+
}
122126
}
123127

124128
/**
125129
* Test of getAuthority method, of class org.biojavax.SimpleNamespace.
126130
*/
127131
public void testGetAuthority() {
128132
System.out.println("testGetAuthority");
129-
130-
assertEquals(authority,ns.getAuthority());
133+
134+
try{
135+
ns.setAuthority(authority);
136+
assertEquals(authority, ns.getAuthority());
137+
}catch(ChangeVetoException ex){
138+
fail("Was not expecting "+ex.getClass().getName());
139+
}
131140
}
132141

133142
/**
@@ -158,10 +167,16 @@ public void testGetName() {
158167
/**
159168
* Test of getURI method, of class org.biojavax.SimpleNamespace.
160169
*/
161-
public void testGetURI() {
170+
public void testGetURI() throws Exception {
162171
System.out.println("testGetURI");
163-
164-
assertEquals(uriString, ns.getURI().toString());
172+
173+
URI uri = new URI(uriString);
174+
try{
175+
ns.setURI(uri);
176+
assertEquals(uriString, ns.getURI().toString());
177+
}catch(ChangeVetoException ex){
178+
fail("Was not expecting "+ex.getClass().getName());
179+
}
165180
}
166181

167182
/**

0 commit comments

Comments
 (0)