Exemplo n.º 1
0
        public void Test_ScreenUnitHelper_Convert_InchToCentimeter()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Inch, ScreenUnit.Centimeter, 60);

            // Assert
            Assert.AreEqual(152.4f, result);
        }
Exemplo n.º 2
0
        public void Test_ScreenUnitHelper_Convert_CentimeterToInch()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Centimeter, ScreenUnit.Inch, 152.4f);

            // Assert
            Assert.AreEqual(60, result);
        }
Exemplo n.º 3
0
        public void Test_ScreenUnitHelper_Convert_InchToPixel()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Inch, ScreenUnit.Pixel, 28);

            // Assert
            Assert.AreEqual(2688, result);
        }
Exemplo n.º 4
0
        public void Test_ScreenUnitHelper_Convert_PixelToInch()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Pixel, ScreenUnit.Inch, 2688);

            // Assert
            Assert.AreEqual(28, result);
        }
Exemplo n.º 5
0
        public void Test_ScreenUnitHelper_Convert_CentimeterToPixel()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Centimeter, ScreenUnit.Pixel, 33);

            // Assert
            Assert.AreEqual(1247.244094488f, result);
        }
Exemplo n.º 6
0
        public void Test_ScreenUnitHelper_Convert_PixelToCentimeter()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Pixel, ScreenUnit.Centimeter, 1247.244094488f);

            // Assert
            Assert.AreEqual(33, result);
        }
Exemplo n.º 7
0
        public void Test_ScreenUnitHelper_Convert_SameUnits()
        {
            // Act
            float result = ScreenUnitHelper.Convert(ScreenUnit.Pixel, ScreenUnit.Pixel, 1);

            // Assert
            Assert.AreEqual(1, result);
        }