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
Merge branch 'improvement/JAL-1988+JAL-3416_flatlaf_osx_apqhandler' into improvement...
[jalview.git]
/
test
/
jalview
/
ext
/
rbvi
/
chimera
/
ChimeraXCommandsTest.java
diff --git
a/test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java
b/test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java
index
439401a
..
03bfbcd
100644
(file)
--- a/
test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java
+++ b/
test/jalview/ext/rbvi/chimera/ChimeraXCommandsTest.java
@@
-35,6
+35,7
@@
import org.testng.annotations.Test;
import jalview.structure.AtomSpecModel;
import jalview.structure.StructureCommand;
import jalview.structure.StructureCommandI;
import jalview.structure.AtomSpecModel;
import jalview.structure.StructureCommand;
import jalview.structure.StructureCommandI;
+import jalview.structure.StructureCommandsI.AtomSpecType;
public class ChimeraXCommandsTest
{
public class ChimeraXCommandsTest
{
@@
-187,7
+188,7
@@
public class ChimeraXCommandsTest
toAlign.addRange("2", 20, 21, "B");
toAlign.addRange("2", 22, 22, "C");
List<StructureCommandI> command = testee.superposeStructures(ref,
toAlign.addRange("2", 20, 21, "B");
toAlign.addRange("2", 22, 22, "C");
List<StructureCommandI> command = testee.superposeStructures(ref,
- toAlign);
+ toAlign, AtomSpecType.ALPHA);
assertEquals(command.size(), 1);
String cmd = command.get(0).getCommand();
String refSpec = "#1/A:12-14/B:18,22-23";
assertEquals(command.size(), 1);
String cmd = command.get(0).getCommand();
String refSpec = "#1/A:12-14/B:18,22-23";
@@
-207,32
+208,36
@@
public class ChimeraXCommandsTest
public void testGetAtomSpec()
{
AtomSpecModel model = new AtomSpecModel();
public void testGetAtomSpec()
{
AtomSpecModel model = new AtomSpecModel();
- assertEquals(testee.getAtomSpec(model, false), "");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY), "");
model.addRange("1", 2, 4, "A");
model.addRange("1", 2, 4, "A");
- assertEquals(testee.getAtomSpec(model, false), "#1/A:2-4");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
+ "#1/A:2-4");
model.addRange("1", 8, 8, "A");
model.addRange("1", 8, 8, "A");
- assertEquals(testee.getAtomSpec(model, false), "#1/A:2-4,8");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
+ "#1/A:2-4,8");
model.addRange("1", 5, 7, "B");
model.addRange("1", 5, 7, "B");
- assertEquals(testee.getAtomSpec(model, false), "#1/A:2-4,8/B:5-7");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
+ "#1/A:2-4,8/B:5-7");
model.addRange("1", 3, 5, "A");
model.addRange("1", 3, 5, "A");
- assertEquals(testee.getAtomSpec(model, false), "#1/A:2-5,8/B:5-7");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
+ "#1/A:2-5,8/B:5-7");
model.addRange("0", 1, 4, "B");
model.addRange("0", 1, 4, "B");
- assertEquals(testee.getAtomSpec(model, false),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
"#0/B:1-4|#1/A:2-5,8/B:5-7");
model.addRange("0", 5, 9, "C");
"#0/B:1-4|#1/A:2-5,8/B:5-7");
model.addRange("0", 5, 9, "C");
- assertEquals(testee.getAtomSpec(model, false),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
"#0/B:1-4/C:5-9|#1/A:2-5,8/B:5-7");
model.addRange("1", 8, 10, "B");
"#0/B:1-4/C:5-9|#1/A:2-5,8/B:5-7");
model.addRange("1", 8, 10, "B");
- assertEquals(testee.getAtomSpec(model, false),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
"#0/B:1-4/C:5-9|#1/A:2-5,8/B:5-10");
model.addRange("1", 8, 9, "B");
"#0/B:1-4/C:5-9|#1/A:2-5,8/B:5-10");
model.addRange("1", 8, 9, "B");
- assertEquals(testee.getAtomSpec(model, false),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
"#0/B:1-4/C:5-9|#1/A:2-5,8/B:5-10");
model.addRange("0", 3, 10, "C"); // subsumes 5-9
"#0/B:1-4/C:5-9|#1/A:2-5,8/B:5-10");
model.addRange("0", 3, 10, "C"); // subsumes 5-9
- assertEquals(testee.getAtomSpec(model, false),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
"#0/B:1-4/C:3-10|#1/A:2-5,8/B:5-10");
model.addRange("5", 25, 35, " ");
"#0/B:1-4/C:3-10|#1/A:2-5,8/B:5-10");
model.addRange("5", 25, 35, " ");
- assertEquals(testee.getAtomSpec(model, false),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.RESIDUE_ONLY),
"#0/B:1-4/C:3-10|#1/A:2-5,8/B:5-10|#5/:25-35");
}
"#0/B:1-4/C:3-10|#1/A:2-5,8/B:5-10|#5/:25-35");
}
@@
-240,32
+245,36
@@
public class ChimeraXCommandsTest
public void testGetAtomSpec_alphaOnly()
{
AtomSpecModel model = new AtomSpecModel();
public void testGetAtomSpec_alphaOnly()
{
AtomSpecModel model = new AtomSpecModel();
- assertEquals(testee.getAtomSpec(model, true), "");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA), "");
model.addRange("1", 2, 4, "A");
model.addRange("1", 2, 4, "A");
- assertEquals(testee.getAtomSpec(model, true), "#1/A:2-4@CA");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
+ "#1/A:2-4@CA");
model.addRange("1", 8, 8, "A");
model.addRange("1", 8, 8, "A");
- assertEquals(testee.getAtomSpec(model, true), "#1/A:2-4,8@CA");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
+ "#1/A:2-4,8@CA");
model.addRange("1", 5, 7, "B");
model.addRange("1", 5, 7, "B");
- assertEquals(testee.getAtomSpec(model, true), "#1/A:2-4,8/B:5-7@CA");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
+ "#1/A:2-4,8/B:5-7@CA");
model.addRange("1", 3, 5, "A");
model.addRange("1", 3, 5, "A");
- assertEquals(testee.getAtomSpec(model, true), "#1/A:2-5,8/B:5-7@CA");
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
+ "#1/A:2-5,8/B:5-7@CA");
model.addRange("0", 1, 4, "B");
model.addRange("0", 1, 4, "B");
- assertEquals(testee.getAtomSpec(model, true),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
"#0/B:1-4@CA|#1/A:2-5,8/B:5-7@CA");
model.addRange("0", 5, 9, "C");
"#0/B:1-4@CA|#1/A:2-5,8/B:5-7@CA");
model.addRange("0", 5, 9, "C");
- assertEquals(testee.getAtomSpec(model, true),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
"#0/B:1-4/C:5-9@CA|#1/A:2-5,8/B:5-7@CA");
model.addRange("1", 8, 10, "B");
"#0/B:1-4/C:5-9@CA|#1/A:2-5,8/B:5-7@CA");
model.addRange("1", 8, 10, "B");
- assertEquals(testee.getAtomSpec(model, true),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
"#0/B:1-4/C:5-9@CA|#1/A:2-5,8/B:5-10@CA");
model.addRange("1", 8, 9, "B");
"#0/B:1-4/C:5-9@CA|#1/A:2-5,8/B:5-10@CA");
model.addRange("1", 8, 9, "B");
- assertEquals(testee.getAtomSpec(model, true),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
"#0/B:1-4/C:5-9@CA|#1/A:2-5,8/B:5-10@CA");
model.addRange("0", 3, 10, "C"); // subsumes 5-9
"#0/B:1-4/C:5-9@CA|#1/A:2-5,8/B:5-10@CA");
model.addRange("0", 3, 10, "C"); // subsumes 5-9
- assertEquals(testee.getAtomSpec(model, true),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
"#0/B:1-4/C:3-10@CA|#1/A:2-5,8/B:5-10@CA");
model.addRange("5", 25, 35, " "); // empty chain code
"#0/B:1-4/C:3-10@CA|#1/A:2-5,8/B:5-10@CA");
model.addRange("5", 25, 35, " "); // empty chain code
- assertEquals(testee.getAtomSpec(model, true),
+ assertEquals(testee.getAtomSpec(model, AtomSpecType.ALPHA),
"#0/B:1-4/C:3-10@CA|#1/A:2-5,8/B:5-10@CA|#5/:25-35@CA");
}
"#0/B:1-4/C:3-10@CA|#1/A:2-5,8/B:5-10@CA|#5/:25-35@CA");
}
@@
-307,8
+316,8
@@
public class ChimeraXCommandsTest
@Test(groups = "Functional")
public void testGetColourCommand()
{
@Test(groups = "Functional")
public void testGetColourCommand()
{
- assertEquals(testee.colourResidues("something", Color.MAGENTA)
- .getCommand(),
+ assertEquals(
+ testee.colourResidues("something", Color.MAGENTA).getCommand(),
"color something #ff00ff");
}
"color something #ff00ff");
}
@@
-319,8
+328,7
@@
public class ChimeraXCommandsTest
model.addRange("1", 89, 92, "A");
model.addRange("2", 12, 20, "B");
model.addRange("2", 8, 9, "B");
model.addRange("1", 89, 92, "A");
model.addRange("2", 12, 20, "B");
model.addRange("2", 8, 9, "B");
- assertEquals(testee.setAttribute("jv_kd", "27.3", model)
- .getCommand(),
+ assertEquals(testee.setAttribute("jv_kd", "27.3", model).getCommand(),
"setattr #1/A:89-92|#2/B:8-9,12-20 res jv_kd '27.3' create true");
}
"setattr #1/A:89-92|#2/B:8-9,12-20 res jv_kd '27.3' create true");
}
@@
-342,8
+350,10
@@
public class ChimeraXCommandsTest
{
List<StructureCommandI> cmds = testee.startNotifications("to here");
assertEquals(cmds.size(), 2);
{
List<StructureCommandI> cmds = testee.startNotifications("to here");
assertEquals(cmds.size(), 2);
- assertEquals(cmds.get(0), new StructureCommand("info notify start models jalview prefix ModelChanged url to here"));
- assertEquals(cmds.get(1), new StructureCommand("info notify start selection jalview prefix SelectionChanged url to here"));
+ assertEquals(cmds.get(0), new StructureCommand(
+ "info notify start models jalview prefix ModelChanged url to here"));
+ assertEquals(cmds.get(1), new StructureCommand(
+ "info notify start selection jalview prefix SelectionChanged url to here"));
}
@Test(groups = "Functional")
}
@Test(groups = "Functional")
@@
-351,8
+361,10
@@
public class ChimeraXCommandsTest
{
List<StructureCommandI> cmds = testee.stopNotifications();
assertEquals(cmds.size(), 2);
{
List<StructureCommandI> cmds = testee.stopNotifications();
assertEquals(cmds.size(), 2);
- assertEquals(cmds.get(0), new StructureCommand("info notify stop models jalview"));
- assertEquals(cmds.get(1), new StructureCommand("info notify stop selection jalview"));
+ assertEquals(cmds.get(0),
+ new StructureCommand("info notify stop models jalview"));
+ assertEquals(cmds.get(1),
+ new StructureCommand("info notify stop selection jalview"));
}
@Test(groups = "Functional")
}
@Test(groups = "Functional")