コード例 #1
0
        public virtual void TestSetMultipliers_arrayDouble()
        {
            IChemObjectSet <T> som = (IChemObjectSet <T>)NewChemObject();
            T container            = NewContainerObject();

            som.Add(container);
            T container2 = NewContainerObject();

            som.Add(container2);

            Assert.AreEqual(1.0, som.GetMultiplier(0).Value, 0.00001);
            Assert.AreEqual(1.0, som.GetMultiplier(1).Value, 0.00001);
            double?[] multipliers = new double?[2];
            multipliers[0] = 2.0;
            multipliers[1] = 3.0;
            som.SetMultipliers(multipliers);
            Assert.AreEqual(2.0, som.GetMultiplier(0).Value, 0.00001);
            Assert.AreEqual(3.0, som.GetMultiplier(1).Value, 0.00001);
        }