public void AreEqual_When_ComparingTwoCompatibleUnits_Then_ResultShouldBeExpected( double lhs, double rhs, bool expected) { var testee1 = new Quantity(lhs, UnitDefinitions.Velocity); var testee2 = new Quantity( rhs, new DerivedUnit(string.Empty, new UnitExpression(UnitDefinitions.Meter.GetPrefixedUnit(Prefixes.Kilo)) / UnitDefinitions.Hour.GetExpression())); var result = QuantityHelper.AreEqual(testee1, testee2); result.Should().Be(expected); }
public void AreEqual_Then_ResultShouldBeExpected( double lhs, string lhsUnit, double rhs, string rhsUnit, bool expected) { var testee1 = new Quantity(lhs, GetUnit(lhsUnit)); var testee2 = new Quantity(rhs, GetUnit(rhsUnit)); var result = QuantityHelper.AreEqual(testee1, testee2); result.Should().Be(expected); }