示例#1
0
        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);
        }
示例#2
0
        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);
        }