public void ImageLoadingLoadImageFromBuffer() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBuffer START"); var stream = FileToStream(image_path); var testingTarget = ImageLoading.LoadImageFromBuffer(stream); Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); Assert.IsInstanceOf <PixelBuffer>(testingTarget, "Should return PixelBuffer instance."); testingTarget.Dispose(); tlog.Debug(tag, $"ImageLoadingLoadImageFromBuffer END (OK)"); }
public void ImageLoadingLoadImageFromBufferWithNullBuffer() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithNullBuffer START"); try { ImageLoading.LoadImageFromBuffer(null); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithNullBuffer END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } }
public void ImageLoadingLoadImageFromBufferWithOrientationCorrection() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrection START"); var stream = FileToStream(imageurl); using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) { var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); Assert.IsInstanceOf <PixelBuffer>(testingTarget, "Should return PixelBuffer instance."); testingTarget.Dispose(); } tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrection END (OK)"); }
public void ImageLoadingLoadImageFromBufferWithSizeNullSize() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSizeNullSize START"); var stream = FileToStream(image_path); try { ImageLoading.LoadImageFromBuffer(stream, null); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSizeNullSize END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } }
public void ImageLoadingLoadImageFromBufferWithSize() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSize START"); var stream = FileToStream(image_path); using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) { var testingTarget = ImageLoading.LoadImageFromBuffer(stream, size2d); Assert.IsNotNull(testingTarget, "Can't create success object PixelBuffer."); Assert.IsInstanceOf <PixelBuffer>(testingTarget, "Should return PixelBuffer instance."); testingTarget.Dispose(); } tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSize END (OK)"); }
public void ImageLoadingLoadImageFromBufferWithOrientationCorrectionNullSize() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrectionNullSize START"); var stream = FileToStream(image_path); try { ImageLoading.LoadImageFromBuffer(stream, null, FittingModeType.ScaleToFill, SamplingModeType.Linear, true);; } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrectionNullSize END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } }
public void ImageLoadingLoadImageFromBufferWithSizeNullBuffer() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSizeNullBuffer START"); using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) { try { ImageLoading.LoadImageFromBuffer(null, size2d); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithSizeNullBuffer END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } } }
public void ImageLoadingLoadImageFromBufferWithOrientationCorrectionNullBuffer() { tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrectionNullBuffer START"); using (Size2D size2d = new Size2D(NUIApplication.GetDefaultWindow().WindowSize.Width, NUIApplication.GetDefaultWindow().WindowSize.Height)) { try { ImageLoading.LoadImageFromBuffer(null, size2d, FittingModeType.ScaleToFill, SamplingModeType.Linear, true); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); tlog.Debug(tag, $"ImageLoadingLoadImageFromBufferWithOrientationCorrectionNullBuffer END (OK)"); Assert.Pass("Caught ArgumentNullException : Passed!"); } } }