public void Inverse_1overA_ReturnsA() { // Arrange IDimension a = CreateStubDimension("a"); CompoundDimension dimension = new CompoundDimension(Dimsensionless.Instance, a); // Act IDimension result = dimension.Inverse(); // Assert Assert.AreSame(a, result); }
public void Inverse_AoverB_ReturnsBoverA() { // Arrange IDimension a = CreateStubDimension("a"); IDimension b = CreateStubDimension("b"); CompoundDimension dimension = new CompoundDimension(a, b); // Act IDimension result = dimension.Inverse(); // Assert Assert.AreEqual(new CompoundDimension(b, a), result); }