/// <summary>
        /// Contruct a Measurement
        /// </summary>
        /// <param name="q">The (howevermany)s of (whatever)s we have</param>
        /// <param name="u">The (whatever)s we have (howevermany)s of</param>
        public Measurement(decimal q, string u)
        {
            var siUnits = new InternationalSystem();

            Quantity = q;
            Exponent = siUnits.Exponent(u);
            BaseUnit = siUnits.BaseUnit(u);
        }
Example #2
0
        public void ShouldConvertInternationalSystemUnitsToBaseUnit(
            [Values("YV", "ZV", "EV", "PV", "TV", "GV", "MV", "kV", "hV", "daV", "V", "dV", "cV", "mV", "µV", "nV", "pV", "fV", "aV", "zV", "yV")]
            string units)
        {
            var siUnits = new InternationalSystem();

            Assert.That(siUnits.BaseUnit(units), Is.EqualTo("V"));
        }