Ejemplo n.º 1
0
        public void ImageLoadingGetClosestImageSize()
        {
            tlog.Debug(tag, $"ImageLoadingGetClosestImageSize START");

            var testingTarget = ImageLoading.GetClosestImageSize("picture");

            Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
            Assert.IsInstanceOf <Size2D>(testingTarget, "Should return Size2D instance.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"ImageLoadingGetClosestImageSize END (OK)");
        }
Ejemplo n.º 2
0
        public void ImageLoadingGetClosestImageSizeWithOrientationCorrection()
        {
            tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithOrientationCorrection START");

            using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
            {
                var testingTarget = ImageLoading.GetClosestImageSize(file_name, size2d, FittingModeType.ShrinkToFit, SamplingModeType.Box, true);
                Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
                Assert.IsInstanceOf <Size2D>(testingTarget, "Should return Size2D instance.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithOrientationCorrection END (OK)");
        }
Ejemplo n.º 3
0
        public void ImageLoadingGetClosestImageSizeWithSize()
        {
            tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithSize START");

            using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height))
            {
                var testingTarget = ImageLoading.GetClosestImageSize(file_name, size2d);
                Assert.IsNotNull(testingTarget, "Can't create success object Size2D.");
                Assert.IsInstanceOf <Size2D>(testingTarget, "Should return Size2D instance.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ImageLoadingGetClosestImageSizeWithSize END (OK)");
        }