Example #1
0
        public void HandlesByteCapitals()
        {
            var    convertModel = new ConvertModel(1, "kB", "kb");
            double result       = UnitHandler.ConvertInput(convertModel, UnitsNet.QuantityType.Information);

            Assert.AreEqual(8, result);
        }
Example #2
0
        public void HandleTemperature()
        {
            var    convertModel = new ConvertModel(1, "DegreeCelsius", "DegreeFahrenheit");
            double result       = UnitHandler.ConvertInput(convertModel, UnitsNet.QuantityType.Temperature);

            Assert.AreEqual(33.79999999999999d, result);
        }
Example #3
0
        public void HandleLength()
        {
            var    convertModel = new ConvertModel(1, "meter", "centimeter");
            double result       = UnitHandler.ConvertInput(convertModel, UnitsNet.QuantityType.Length);

            Assert.AreEqual(100, result);
        }
        public void HandleNanometerToKilometer()
        {
            var    convertModel = new ConvertModel(1, "nanometer", "kilometer");
            double result       = UnitHandler.ConvertInput(convertModel, UnitsNet.QuantityType.Length);

            Assert.AreEqual(1E-12, result);
        }