public void Should_contain_the_same_atoms(string symbol1, string symbol2)
        {
            var compound1 = ChemicalCompound.New(symbol1);
            var compound2 = ChemicalCompound.New(symbol2);

            Assert.True(compound1.AreIsomers(compound2));
        }
Example #2
0
        public void Check_molecule_properties(string compoundSymbol, bool isHomonuclear, bool isHeteronuclear, bool isDiatomic)
        {
            var compound = ChemicalCompound.New(compoundSymbol, "");

            Assert.Equal(compound.IsHomonuclear, isHomonuclear);
            Assert.Equal(compound.IsHeteronuclear, isHeteronuclear);
            Assert.Equal(compound.IsDiatomic, isDiatomic);
        }
        public void Should_calculate_electrons_neutrons_protons_for_CompoundStack(string compoundSymbol, int electrons, int neutrons, int protons, int atoms)
        {
            var compound = ChemicalCompound.New(compoundSymbol);

            Assert.Equal(compound.GetTotalElectronsCount(), electrons);
            Assert.Equal(compound.GetTotalNeutronsCount(), neutrons);
            Assert.Equal(compound.GetTotalProtonsCount(), protons);
            Assert.Equal(compound.GetAtoms().Count(), atoms);
        }
        public void Should_contain_phenyl_group(string compoundSymbol, bool hasPhenylGroup)
        {
            var compound = ChemicalCompound.New(compoundSymbol);

            Assert.Equal(compound.HasPhenylGroup, hasPhenylGroup);
        }
        public void Should_contain_hydroxy_group(string compoundSymbol, bool hasHydroxyGroup)
        {
            var compound = ChemicalCompound.New(compoundSymbol);

            Assert.Equal(compound.HasHydroxyGroup, hasHydroxyGroup);
        }
        public void Should_be_an_organic_compound(string compoundSymbol, bool isOrganic)
        {
            var compound = ChemicalCompound.New(compoundSymbol);

            Assert.Equal(compound.IsOrganic, isOrganic);
        }