Skip to content

Commit 8459e6f

Browse files
committed
Fixed modfinder tests
1 parent 4aa712b commit 8459e6f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

biojava-modfinder/src/main/java/org/biojava/nbio/protmod/structure/ProteinModificationIdentifier.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public void identify(final List<Chain> chains,
272272
Map<Component, Set<Group>> mapCompGroups = new HashMap<Component, Set<Group>>();
273273

274274
for (Chain chain : chains) {
275-
mapChainIdChain.put(chain.getChainID(), chain);
275+
mapChainIdChain.put(chain.getName(), chain);
276276

277277
List<Group> ress = StructureUtil.getAminoAcids(chain);
278278

@@ -288,7 +288,7 @@ public void identify(final List<Chain> chains,
288288
if (residues.isEmpty()) {
289289
String pdbId = "?";
290290
if ( chains.size() > 0) {
291-
Structure struc = chains.get(0).getParent();
291+
Structure struc = chains.get(0).getStructure();
292292
if ( struc != null)
293293
pdbId = struc.getPDBCode();
294294
}

biojava-modfinder/src/test/java/org/biojava/nbio/protmod/structure/ProteinModificationParserTest.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,11 @@ public void testParser() throws IOException, StructureException {
291291
multiTest();
292292
}
293293

294-
public void multiTest() {
294+
public void multiTest() throws IOException, StructureException {
295295
for ( String[] name : strucs){
296-
try {
297-
// parserTest(name[0], (String)null);
298-
parserTest(name[0], name[1]);
299-
} catch (Exception e){
300-
logger.error("Exception: ", e);
301-
fail(e.getMessage());
302-
}
296+
parserTest(name[0], (String)null);
297+
parserTest(name[0], name[1]);
298+
303299
}
304300
}
305301

0 commit comments

Comments
 (0)