Example #1
0
 public void IsAromatic_element_null()
 {
     try
     {
         IAtom a = AtomBuilder.Aromatic((Element)null).Build();
         Assert.Fail();
     }
     catch (ArgumentNullException)
     { }
 }
Example #2
0
        public void IsAromatic_element_c()
        {
            IAtom a = AtomBuilder.Aromatic(Carbon).Build();

            Assert.AreEqual(a.Element, Element.Carbon);
            Assert.AreEqual(a.Isotope, -1);
            Assert.AreEqual(a.Charge, 0);
            Assert.AreEqual(a.AtomClass, 0);
            Assert.AreEqual(a.IsAromatic(), true);
        }
Example #3
0
 public void IsAromatic_element_cl()
 {
     try
     {
         IAtom a = AtomBuilder.Aromatic(Chlorine).Build();
         Assert.Fail();
     }
     catch (ArgumentException)
     { }
 }
Example #4
0
 public void IsAromatic_symbol_null()
 {
     try
     {
         IAtom a = AtomBuilder.Aromatic((string)null).Build();
         Assert.Fail();
     }
     catch (ArgumentNullException)
     { }
 }
Example #5
0
 public void IsAromatic_symbol_cl()
 {
     try
     {
         IAtom a = AtomBuilder.Aromatic("Cl").Build();
         Assert.Fail();
     }
     catch (ArgumentException)
     { }
 }
Example #6
0
        public void IsAromatic_symbol_n()
        {
            IAtom a = AtomBuilder.Aromatic("N")
                      .Build();

            Assert.AreEqual(a.Element, Element.Nitrogen);
            Assert.AreEqual(a.Isotope, -1);
            Assert.AreEqual(a.Charge, 0);
            Assert.AreEqual(a.AtomClass, 0);
            Assert.AreEqual(a.IsAromatic(), true);
        }
Example #7
0
 public void IsAromatic_Unknown_from_symbol()
 {
     Assert.IsNotNull(AtomBuilder.Aromatic("*").Build());
     Assert.IsNotNull(AtomBuilder.Aromatic("R").Build());
 }
Example #8
0
 public void IsAromatic_Unknown_from_element()
 {
     Assert.IsNotNull(AtomBuilder.Aromatic(Unknown).Build());
 }