Beispiel #1
0
        public void TestGetCountMolecules()
        {
            var testSubject = MoleculeFactory.Propane();

            var testResult = testSubject.GetCountMolecules(74.6D);

            Console.WriteLine(string.Format("{0:n0}", testResult));

            Assert.IsTrue(testResult > 1.018E+24);
            Assert.IsTrue(testResult < 1.019E+24);
        }
Beispiel #2
0
        public void TestAddFormalCharges()
        {
            var testSubject = MoleculeFactory.Hydronium();

            testSubject.SumFormalCharge();
            var testResult = testSubject.Atoms.FirstOrDefault(a => a.Symbol == "O");

            Assert.IsNotNull(testResult);
            Assert.AreEqual(1, testResult.FormalCharge);

            var pathToImg = testSubject.DepictMolecule();

            Console.WriteLine(pathToImg);
        }
Beispiel #3
0
        public void TestGetMostElectronegativeAtom()
        {
            var testSubject = MoleculeFactory.Water();

            var testResult = testSubject.GetMostElectronegativeAtom();

            Assert.IsNotNull(testResult);

            var testCtrl = testSubject.Atoms.FirstOrDefault(a => a.Symbol == "O");

            Assert.IsNotNull(testCtrl);

            Assert.AreEqual(testCtrl, testResult);
        }