Skip to content

Commit 7f27f94

Browse files
luke czaplaluke czapla
authored andcommitted
final tests using getLength() and others
1 parent 3f8b75b commit 7f27f94

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/BasePairParameters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public BasePairParameters analyze() {
202202
* Returns the total number of base pairs that were found, after the call to analyze()
203203
* @return An integer value, number of base pairs
204204
*/
205-
public Integer getLength() {
205+
public int getLength() {
206206
if (structure == null || pairParameters == null) throw new IllegalArgumentException();
207207
return pairingParameters.length;
208208
}

biojava-structure/src/test/java/org/biojava/nbio/structure/basepairs/TestBasePairParameters.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void testBasePair() throws IOException, StructureException {
2727
bp.analyze();
2828
String sequence = bp.getPairSequence();
2929

30-
assertEquals(bp.getPairingParameters().length, 147);
30+
assertEquals(147, bp.getLength());
3131
// below all this set of comparator data was from an external program, 3DNA.
3232
// next three in degrees: buckle, propeller, opening
3333
assertEquals(bp.getBuckle(0), -3.796, 0.1);
@@ -49,7 +49,7 @@ public void testBasePair() throws IOException, StructureException {
4949

5050
structure = StructureIO.getStructure("3PHP");
5151
bp = new TertiaryBasePairParameters(structure, true, false).analyze();
52-
assertEquals(9, bp.getPairingParameters().length);
52+
assertEquals(9, bp.getLength());
5353

5454
double[][] pairs = bp.getPairingParameters();
5555
double[][] steps = bp.getStepParameters();
@@ -75,7 +75,7 @@ public void testBasePair() throws IOException, StructureException {
7575
structure = StructureIO.getStructure("1P71");
7676

7777
bp = new MismatchedBasePairParameters(structure, false, false, false).analyze();
78-
assertEquals(17, bp.getPairingParameters().length);
78+
assertEquals(17, bp.getLength());
7979

8080
pairs = bp.getPairingParameters();
8181
steps = bp.getStepParameters();

0 commit comments

Comments
 (0)