22import static org.junit.jupiter.api.Assertions.assertEquals;
23import static org.junit.jupiter.api.Assertions.assertFalse;
24import static org.junit.jupiter.api.Assertions.assertThrows;
25import static org.junit.jupiter.api.Assertions.assertTrue;
27import java.util.ArrayList;
28import java.util.Arrays;
29import java.util.Collections;
30import java.util.HashMap;
34import org.junit.jupiter.api.Test;
36import denoptim.constants.DENOPTIMConstants;
37import denoptim.exception.DENOPTIMException;
38import denoptim.graph.Edge.BondType;
54 BondType.UNDEFINED);},
55 "Wrong syntax for whole APClass string");
57 "Wrong syntax for 'rule' string");
96 assertTrue(a==b,
"a==b operator");
101 assertTrue(a==c,
"a==c operator");
102 assertTrue(c==b,
"c==b operator");
120 List<APClass> list =
new ArrayList<APClass>();
122 assertTrue(list.contains(a),
"List contains A");
123 assertTrue(list.contains(d),
"List contains B");
124 assertTrue(list.contains(c),
"List contains C");
125 assertTrue(list.contains(b),
"List contains D");
127 Map<APClass,APClass> map =
new HashMap<APClass,APClass>();
130 assertTrue(map.containsKey(a),
"Map contains A");
131 assertTrue(map.containsKey(b),
"Map contains B");
132 assertTrue(map.containsKey(c),
"Map contains C");
133 assertTrue(map.containsKey(d),
"Map contains D");
145 List<APClass> l =
new ArrayList<APClass>(Arrays.asList(d,a,b,c));
147 List<APClass> ref =
new ArrayList<APClass>(Arrays.asList(b,a,c,d));
148 for (
int i=0; i<l.size(); i++)
152 assertEquals(er,el,
" Entries "+er+
" != "+el);
General set of constants used in DENOPTIM.
static final String SEPARATORAPPROPSCL
Separator between APClass and APSubClass and coordinates.
static boolean isValidAPRuleString(String s)
Evaluates the given string as a candidate attachment point rule, i.e., as name of a fragmentation rul...
static final BondType DEFAULTBT
Default bond type for all but APClasses of RCVs.
static boolean isValidAPSubCLassString(String s)
Evaluate the given string as a candidate for attachment point subclass, i.e., the attachment point cl...
static APClass make(String ruleAndSubclass)
Creates an APClass if it does not exist already, or returns the reference to the existing instance.
void testIsValidAPRuleString()
void testIsValidAPSubCLassString()
Possible chemical bond types an edge can represent.