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