Example #1
0
        public void MassToMzZeroCharge()
        {
            ObjectWithMass1000 a = new ObjectWithMass1000();
            var ex = Assert.Throws <DivideByZeroException>(() => a.ToMZ(0));

            Assert.That(ex.Message, Is.EqualTo("Charge cannot be zero"));
        }
Example #2
0
        public void MassToMzPositiveCharge()
        {
            ObjectWithMass1000 a  = new ObjectWithMass1000();
            double             mz = a.ToMZ(2);

            Assert.AreEqual(501.00727646687898, mz);
        }
Example #3
0
        public void MassToMzNegativeCharge()
        {
            ObjectWithMass1000 a  = new ObjectWithMass1000();
            double             mz = a.ToMZ(-2);

            Assert.AreEqual(498.99272353312102, mz);
        }
Example #4
0
        public void MassToMzToMass()
        {
            ObjectWithMass1000 a  = new ObjectWithMass1000();
            double             mz = a.ToMZ(2).ToMass(2);

            Assert.AreEqual(1000, mz);
        }