Beispiel #1
0
        public void UsingExponent()
        {
            var m1 = 3 * Meter;
            var m2 = m1 ^ 3;

            m2.IsEqualTo(new Measure(27m, Meter.Cubed()));
        }
Beispiel #2
0
        public void CheckWhereCancelingOutDidntWork()
        {
            StandardUnitConfiguration.Use();
            var dAir       = 1.225m * Kilogram / Meter.Cubed();
            var someVolume = (1 * Meter) ^ 3;

            _output.WriteLine(dAir.ToString());
            _output.WriteLine(someVolume.ToString());

            var measure = (dAir * someVolume);

            measure.Unit.IsEqualTo(Kilogram);

            measure.ToString(CultureInfo.InvariantCulture).IsEqualTo("1.225kg");
        }