public void TestMethanol() { var filename = "NCDK.Data.CTX.methanol_with_descriptors.ctx"; Trace.TraceInformation("Testing: " + filename); var ins = ResourceLoader.GetAsStream(filename); var reader = new CTXReader(ins); var chemFile = reader.Read(builder.NewChemFile()); reader.Close(); Assert.IsNotNull(chemFile); Assert.AreEqual(1, chemFile.Count); var seq = chemFile[0]; Assert.IsNotNull(seq); Assert.AreEqual(1, seq.Count); var model = seq[0]; Assert.IsNotNull(model); var moleculeSet = model.MoleculeSet; Assert.IsNotNull(moleculeSet); Assert.AreEqual(1, moleculeSet.Count); var container = moleculeSet[0]; Assert.IsNotNull(container); Assert.AreEqual(6, container.Atoms.Count, "Incorrect atom count."); Assert.AreEqual(5, container.Bonds.Count); Assert.AreEqual("Petra", container.Id); Assert.IsNotNull(container.Title); Assert.AreEqual("CH4O", container.Title); }
public void TestAccepts() { var reader = new CTXReader(new StringReader("")); Assert.IsTrue(reader.Accepts(typeof(IChemFile))); }