public void DivideOperator_DivideByItself_ReturnsUnityDoublet() { var expected = new MeasureTriplet <Number, Number, Number>(1.0, 1.0, 1.0); var actual = _instance / _instance; IMeasureTripletAssert.AreEqual(expected, actual); }
public void TimesOperator_MultiplyScalarRhs_AllMeasuresEquallyScaled() { var expected = new MeasureTriplet <Time, Power, ElectricPotential>(15.0, 0.36, 1.8);; var actual = _instance * 3.0; IMeasureTripletAssert.AreEqual(expected, actual); }
public void DivideOperator_DivideBy2And3And4_ReturnsHalfTimeOneThirdPowerOneFourthPotential() { var expected = new MeasureTriplet <Time, Power, ElectricPotential>(2.5, 0.04, 0.15); var actual = _instance / new MeasureTriplet <Number, Number, Number>(2.0, 3.0, 4.0); IMeasureTripletAssert.AreEqual(expected, actual); }
public void TimesOperator_MultiplyBy2And3And4_ReturnsDoubleTimeThreeTimesPowerFourTimesPotential() { var expected = new MeasureTriplet <Time, Power, ElectricPotential>(10.0, 0.36, 2.4); var actual = _instance * new MeasureTriplet <Number, Number, Number>(2.0, 3.0, 4.0); IMeasureTripletAssert.AreEqual(expected, actual); }
public void MinusOperator_SubtractInstanceWithItself_ReturnsZero() { var expected = new MeasureTriplet <Time, Power, ElectricPotential>(0.0, 0.0, 0.0); var actual = _instance - _instance; IMeasureTripletAssert.AreEqual(expected, actual); }
public void PlusOperator_AddInstanceWithItself_ReturnsDoubleInstance() { var expected = new MeasureTriplet <Time, Power, ElectricPotential>(10.0, 0.24, 1.2); var actual = _instance + _instance; IMeasureTripletAssert.AreEqual(expected, actual); }
public void TimesOperator_MultiplyNumberRhs_AllMeasuresEquallyScaled() { var expected = new StandardMeasureTriplet <Time, Power, ElectricPotential>(15.0, 0.36, 1.8);; var actual = new StandardMeasure <Number>(3.0) * _instance; IMeasureTripletAssert.AreEqual(expected, actual); }