public void NapthaleneSubsearch() { int[] match = Ullmann.FindSubstructure( TestMoleculeFactory.MakeNaphthalene()).Match( TestMoleculeFactory.MakeBenzene()); Assert.IsTrue(Compares.AreDeepEqual(Array.Empty <int>(), match)); int count = Ullmann.FindSubstructure( TestMoleculeFactory.MakeNaphthalene()).MatchAll( TestMoleculeFactory.MakeBenzene()).ToReadOnlyList().Count; Assert.AreEqual(0, count); }
public void BenzeneSubsearch() { int[] match = Ullmann.FindSubstructure( TestMoleculeFactory.MakeBenzene()).Match( TestMoleculeFactory.MakeNaphthalene()); Assert.IsTrue(Compares.AreDeepEqual(new int[] { 2, 7, 6, 5, 4, 3 }, match)); int count = Ullmann.FindSubstructure( TestMoleculeFactory.MakeBenzene()).MatchAll( TestMoleculeFactory.MakeNaphthalene()).ToReadOnlyList().Count; Assert.AreEqual(6, count); // note: aromatic one would be 24 }