context: using Microsoft.VisualStudio.TestTools.UnitTesting;
  using System;
  using static NCDK.Beam.Element;
  
  namespace NCDK.Beam
  {
     /// <summary> <author>John May </author></summary>
      [TestClass()]
      public class AtomBuilderTest
      {
          [TestMethod()]
          public void Aliphatic_element_c()
          {
              IAtom a = AtomBuilder.Aliphatic(Element.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(), false);
          }
  
          [TestMethod()]
          public void Aliphatic_element_n()
          {
              IAtom a = AtomBuilder.Aliphatic(Element.Nitrogen)
                                  .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(), false);
          }
  
          [TestMethod()]
          public void Aliphatic_element_null()
          {
              try
              {
                  IAtom a = AtomBuilder.Aliphatic((Element)null).Build();
                  Assert.Fail();
              }
              catch (ArgumentNullException)
              { }
          }
  
          [TestMethod()]
          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);
          }
  
          [TestMethod()]
          public void IsAromatic_element_n()
          {
              IAtom a = AtomBuilder.Aromatic(Nitrogen)
                                  .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);
          }
  
          [TestMethod()]
          public void IsAromatic_element_cl()
          {
              try
              {
                  IAtom a = AtomBuilder.Aromatic(Chlorine).Build();
                  Assert.Fail();
              }
              catch (ArgumentException)
              { }
          }
  
          [TestMethod()]
          public void IsAromatic_element_null()
          {
              try
              {
                  IAtom a = AtomBuilder.Aromatic((Element)null).Build();
                  Assert.Fail();
              }
              catch (ArgumentNullException)
              { }
          }
  
          [TestMethod()]
          public void Aliphatic_symbol_c()
          {
              IAtom a = AtomBuilder.Aliphatic("C").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(), false);
          }
  
          [TestMethod()]
          public void Aliphatic_symbol_n()
          {
              IAtom a = AtomBuilder.Aliphatic("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(), false);
          }
  
          [TestMethod()]
          public void Aliphatic_symbol_null()
          {
              try
              {
                  IAtom a = AtomBuilder.Aliphatic((string)null).Build();
                  Assert.Fail();
              }
              catch (ArgumentNullException)
              { }
          }
  
          [TestMethod()]
          public void IsAromatic_symbol_c()
          {
              IAtom a = AtomBuilder.Aromatic("C").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);
          }
  
          [TestMethod()]
          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);
          }
  
          [TestMethod()]
          public void IsAromatic_symbol_cl()
          {
              try
              {
                  IAtom a = AtomBuilder.Aromatic("Cl").Build();
                  Assert.Fail();
              }
              catch (ArgumentException)
              { }
          }
  
          [TestMethod()]
          public void IsAromatic_symbol_null()
          {
              try
              {
                  IAtom a = AtomBuilder.Aromatic((string)null).Build();
                  Assert.Fail();
              }
              catch (ArgumentNullException)
              { }
          }
  
          [TestMethod()]
          public void Create_symbol_aliphatic_c()
          {
              IAtom a = AtomBuilder.Create("C").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(), false);
          }
  
          [TestMethod()]
          public void Create_symbol_IsAromatic_c()
          {
              IAtom a = AtomBuilder.Create("c")
                                  .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);
          }
  
          [TestMethod()]
          public void Create_symbol_non_IsAromatic()
          {
              try
              {
                  IAtom a = AtomBuilder.Create("cl").Build();
                  Assert.Fail();
              }
              catch (ArgumentException)
              { }
          }
  
          [TestMethod()]
          public void Create_symbol_defaultToUnknown()
          {
  
gt:             IAtom a = AtomBuilder.Create("N/A")