git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3746 apply copyright to tests
[jalview.git]
/
test
/
jalview
/
ws
/
PDBSequenceFetcherTest.java
diff --git
a/test/jalview/ws/PDBSequenceFetcherTest.java
b/test/jalview/ws/PDBSequenceFetcherTest.java
index
ba90dd8
..
e7f9ff1
100644
(file)
--- a/
test/jalview/ws/PDBSequenceFetcherTest.java
+++ b/
test/jalview/ws/PDBSequenceFetcherTest.java
@@
-62,7
+62,7
@@
public class PDBSequenceFetcherTest
Cache.applicationProperties.setProperty("ADD_SS_ANN",
Boolean.TRUE.toString());
Cache.applicationProperties.setProperty("ADD_SS_ANN",
Boolean.TRUE.toString());
- sf = new SequenceFetcher(false);
+ sf = new SequenceFetcher();
}
/**
}
/**
@@
-132,6
+132,7
@@
public class PDBSequenceFetcherTest
private void testRetrieveProteinSeqFromPDB() throws Exception
{
List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
private void testRetrieveProteinSeqFromPDB() throws Exception
{
List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
+ StringBuilder errors = new StringBuilder();
for (TestRetrieveObject str : toRetrieve)
{
AlignmentI response = sps.get(0).getSequenceRecords(str.id);
for (TestRetrieveObject str : toRetrieve)
{
AlignmentI response = sps.get(0).getSequenceRecords(str.id);
@@
-146,21
+147,21
@@
public class PDBSequenceFetcherTest
sq.getAllPDBEntries().size() > 0);
// FIXME: should test that all residues extracted as sequences from
// chains in structure have a mapping to data in the structure
sq.getAllPDBEntries().size() > 0);
// FIXME: should test that all residues extracted as sequences from
// chains in structure have a mapping to data in the structure
- StringBuilder errors = new StringBuilder();
List<SequenceFeature> prev = null;
int lastp = -1;
List<SequenceFeature> prev = null;
int lastp = -1;
- for (int rs = sq.getStart(); rs < sq.getStart()
- + sq.getLength(); rs++)
+ for (int col = 1; col <= sq.getLength(); col++)
{
{
- List<SequenceFeature> sf = sq.findFeatures(rs, rs, "RESNUM");
+ List<SequenceFeature> sf = sq.findFeatures(col, col, "RESNUM");
if (sf.size() != 1)
{
if (sf.size() != 1)
{
- errors.append(
- "Expected feature at " + rs + ": saw " + sf.size());
+ errors.append(str.id + ": "
+ + "Expected one feature at column (position): "
+ + (col - 1) + " (" + sq.findPosition(col - 1) + ")"
+ + ": saw " + sf.size());
errors.append("\n");
if (prev != null)
{
errors.append("\n");
if (prev != null)
{
- errors.append("Last Feature was at " + lastp + ": "
+ errors.append("Last Feature was at position " + lastp + ": "
+ prev.get(0).toString());
errors.append("\n");
}
+ prev.get(0).toString());
errors.append("\n");
}
@@
-168,14
+169,14
@@
public class PDBSequenceFetcherTest
else
{
prev = sf;
else
{
prev = sf;
- lastp = rs;
+ lastp = sq.findPosition(col - 1);
}
}
}
}
- if (errors.length() > 0)
- {
- Assert.fail(errors.toString());
- }
}
}
}
}
+ if (errors.length() > 0)
+ {
+ Assert.fail(errors.toString());
+ }
}
}
}
}