Ejemplo n.º 1
0
        public void OpMultiplicationAcceleration()
        {
            Speed speedBase = new Time(20, TimeUnit.Second) * new Acceleration(3, AccelerationUnit.MeterPerSecondSquared);
            speedBase.ShouldEqual(new Speed(60, SpeedUnit.MeterPerSecond));

            var time = new Time(1, TimeUnit.Minutes);
            var acceleration = new Acceleration(1, AccelerationUnit.MilePerHourPerSecond);
            Speed speed = time * acceleration;
            speed.Units = SpeedUnit.MilesPerHour;
            speed.ShouldEqual(new Speed(60, SpeedUnit.MilesPerHour));
        }