Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public void Setup()
 {
     _instance = new MeasureTriplet<Time, Power, ElectricPotential>(5.0, 0.12, 0.6);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
 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);
 }