public void Charge_Multiplication_Then_ResultShouldBeExpected() { var testee = new Charge(3, x => x.Coulombs); var potential = new Potential(4, x => x.Volts); var result = testee * potential; result.Should().Be(12, "J", UnitFormat.Default); }
public void Potential_Add_Then_ResultShouldBeExpected() { var lhs = new Potential(5, units => units.Milli.Volts); var rhs = new Potential(5000, units => units.Micro.Volts); var result = lhs + rhs; result.Should().Be(10, "mV", UnitFormat.Default); }