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 TimesOperator_MultiplyNumberLhs_AllMeasuresEquallyScaled() { var expected = new MeasureTriplet<Time, Power, ElectricPotential>(15.0, 0.36, 1.8); ; var actual = _instance * new Number(3.0); IMeasureTripletAssert.AreEqual(expected, actual); }
public void Setup() { _instance = new MeasureTriplet<Time, Power, ElectricPotential>(5.0, 0.12, 0.6); }
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 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 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 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); }