public void TestTokenizer(string[] orderedMatches, string toSearch) { Match found = AtomCounter.GetTokenizer().Match(toSearch); foreach (string match in orderedMatches) { Assert.Equal(match, found.Value); found = found.NextMatch(); } }
public void TestRepetitions(string molecule, string[] keys, int[] values) { Dictionary <string, int> atoms = Enumerable.Range(0, keys.Length).ToDictionary(i => keys[i], i => values[i]); Assert.Equal(atoms, AtomCounter.ParseMolecule(molecule)); }