@@ -89,7 +89,7 @@ public void testAddAtom_IAtom() {
8989 public void testAddAtom_IAtom_IMonomer () {
9090 IStrand oStrand = (IStrand ) newChemObject ();
9191 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
92- oMono1 .setMonomerName (new String ( "TRP279" ) );
92+ oMono1 .setMonomerName ("TRP279" );
9393 IAtom oAtom1 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
9494 IAtom oAtom2 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
9595 IAtom oAtom3 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
@@ -105,9 +105,9 @@ public void testAddAtom_IAtom_IMonomer() {
105105 public void testGetMonomerCount () {
106106 IStrand oStrand = (IStrand ) newChemObject ();
107107 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
108- oMono1 .setMonomerName (new String ( "TRP279" ) );
108+ oMono1 .setMonomerName ("TRP279" );
109109 IMonomer oMono2 = oStrand .getBuilder ().newInstance (IMonomer .class );
110- oMono2 .setMonomerName (new String ( "HOH" ) );
110+ oMono2 .setMonomerName ("HOH" );
111111 IAtom oAtom2 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
112112 IAtom oAtom3 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
113113 oStrand .addAtom (oAtom2 , oMono1 );
@@ -120,9 +120,9 @@ public void testGetMonomerCount() {
120120 public void testGetMonomer_String () {
121121 IStrand oStrand = (IStrand ) newChemObject ();
122122 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
123- oMono1 .setMonomerName (new String ( "TRP279" ) );
123+ oMono1 .setMonomerName ("TRP279" );
124124 IMonomer oMono2 = oStrand .getBuilder ().newInstance (IMonomer .class );
125- oMono2 .setMonomerName (new String ( "HOH" ) );
125+ oMono2 .setMonomerName ("HOH" );
126126 IAtom oAtom2 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
127127 IAtom oAtom3 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
128128 oStrand .addAtom (oAtom2 , oMono1 );
@@ -137,9 +137,9 @@ public void testGetMonomer_String() {
137137 public void testGetMonomerNames () {
138138 IStrand oStrand = (IStrand ) newChemObject ();
139139 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
140- oMono1 .setMonomerName (new String ( "TRP279" ) );
140+ oMono1 .setMonomerName ("TRP279" );
141141 IMonomer oMono2 = oStrand .getBuilder ().newInstance (IMonomer .class );
142- oMono2 .setMonomerName (new String ( "HOH" ) );
142+ oMono2 .setMonomerName ("HOH" );
143143 IAtom oAtom2 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
144144 IAtom oAtom3 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
145145 oStrand .addAtom (oAtom2 , oMono1 );
@@ -167,7 +167,7 @@ public void testGetMonomerNames() {
167167 public void testRemoveMonomer_String () {
168168 IStrand oStrand = (IStrand ) newChemObject ();
169169 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
170- oMono1 .setMonomerName (new String ( "TRP279" ) );
170+ oMono1 .setMonomerName ("TRP279" );
171171 IAtom oAtom1 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
172172 oStrand .addAtom (oAtom1 , oMono1 );
173173 Assert .assertTrue (oStrand .getMonomerNames ().contains (oMono1 .getMonomerName ()));
@@ -181,9 +181,9 @@ public void testRemoveMonomer_String() {
181181 public void testGetMonomers () {
182182 IStrand oStrand = (IStrand ) newChemObject ();
183183 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
184- oMono1 .setMonomerName (new String ( "TRP279" ) );
184+ oMono1 .setMonomerName ("TRP279" );
185185 IMonomer oMono2 = oStrand .getBuilder ().newInstance (IMonomer .class );
186- oMono2 .setMonomerName (new String ( "HOH" ) );
186+ oMono2 .setMonomerName ("HOH" );
187187 IAtom oAtom2 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
188188 IAtom oAtom3 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
189189 oStrand .addAtom (oAtom2 , oMono1 );
@@ -207,20 +207,16 @@ public void testGetMonomers() {
207207 public void testToString () {
208208 IStrand oStrand = (IStrand ) newChemObject ();
209209 IMonomer oMono1 = oStrand .getBuilder ().newInstance (IMonomer .class );
210- oMono1 .setMonomerName (new String ( "TRP279" ) );
210+ oMono1 .setMonomerName ("TRP279" );
211211 IMonomer oMono2 = oStrand .getBuilder ().newInstance (IMonomer .class );
212- oMono2 .setMonomerName (new String ( "HOH" ) );
212+ oMono2 .setMonomerName ("HOH" );
213213 IAtom oAtom2 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
214214 IAtom oAtom3 = oStrand .getBuilder ().newInstance (IAtom .class , "C" );
215215 oStrand .addAtom (oAtom2 , oMono1 );
216216 oStrand .addAtom (oAtom3 , oMono2 );
217- Map <String , IMonomer > monomers = new Hashtable <String , IMonomer >();
218217 IMonomer oMon = oStrand .getBuilder ().newInstance (IMonomer .class );
219218 oMon .setMonomerName ("" );
220219 oMon .setMonomerType ("UNKNOWN" );
221- monomers .put ("" , oMon );
222- monomers .put ("TRP279" , oMono1 );
223- monomers .put ("HOH" , oMono2 );
224220 String description = oStrand .toString ();
225221 for (int i = 0 ; i < description .length (); i ++) {
226222 Assert .assertTrue ('\n' != description .charAt (i ));
@@ -236,7 +232,7 @@ public void testToString() {
236232 public void testClone () throws Exception {
237233 IStrand strand = (IStrand ) newChemObject ();
238234 Object clone = strand .clone ();
239- Assert .assertTrue (clone instanceof IStrand );
235+ Assert .assertNotNull (clone );
240236 }
241237
242238}
0 commit comments