Skip to content

Commit db70738

Browse files
committed
Added unit test
1 parent 1095731 commit db70738

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

  • biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package org.biojava.nbio.structure.test;
2+
3+
import org.biojava.nbio.structure.Chain;
4+
import org.biojava.nbio.structure.Group;
5+
import org.biojava.nbio.structure.Structure;
6+
import org.biojava.nbio.structure.StructureIO;
7+
import org.biojava.nbio.structure.align.util.AtomCache;
8+
import org.biojava.nbio.structure.io.FileParsingParameters;
9+
import org.biojava.nbio.structure.io.LocalPDBDirectory.FetchBehavior;
10+
11+
import junit.framework.TestCase;
12+
13+
public class Test1o2f extends TestCase{
14+
15+
private static Structure structure = null;
16+
17+
18+
@Override
19+
protected void setUp() throws Exception {
20+
super.setUp();
21+
AtomCache cache = new AtomCache();
22+
cache.setUseMmCif(true);
23+
cache.setFetchBehavior(FetchBehavior.FETCH_FILES);
24+
FileParsingParameters params = cache.getFileParsingParams();
25+
params.setLoadChemCompInfo(true);
26+
params.setUseInternalChainId(true);
27+
cache.setFileParsingParams(params);
28+
StructureIO.setAtomCache(cache);
29+
String pdbId = "1O2F";
30+
structure = StructureIO.getStructure(pdbId);
31+
}
32+
33+
34+
public void test1a4wPDBFile(){
35+
for(int i=0;i<structure.nrModels();i++){
36+
for(Chain c: structure.getChains(i)){
37+
assertNotNull(c.getChainID());
38+
assertNotNull(c.getInternalChainID());
39+
}
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)