规范类名及命名空间名称
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
using System.Windows;
|
||||
using Moq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using ImageProcessing.Core;
|
||||
using Moq;
|
||||
using XP.ImageProcessing.Core;
|
||||
using XplorePlane.Services;
|
||||
using System;
|
||||
|
||||
namespace XplorePlane.Tests.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试辅助工具:创建 Mock 和测试用图像
|
||||
/// 瘚贝�颲�𨭌撌亙�嚗𡁜�撱?Mock �峕�霂閧鍂�曉�
|
||||
/// </summary>
|
||||
internal static class TestHelpers
|
||||
{
|
||||
public static readonly string[] DefaultKeys = { "Blur", "Sharpen", "Threshold" };
|
||||
|
||||
/// <summary>
|
||||
/// 创建一个 1x1 像素的 BitmapSource,用于测试
|
||||
/// �𥕦遣銝�銝?1x1 �讐��?BitmapSource嚗𣬚鍂鈭擧�霂?
|
||||
/// </summary>
|
||||
public static BitmapSource CreateTestBitmap(int width = 4, int height = 4)
|
||||
{
|
||||
@@ -32,13 +31,13 @@ namespace XplorePlane.Tests.Helpers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建一个超大图像(用于测试预览缩放)
|
||||
/// �𥕦遣銝�銝芾�憭批㦛�𧶏��其�瘚贝�憸��蝻拇𦆮嚗?
|
||||
/// </summary>
|
||||
public static BitmapSource CreateLargeBitmap(int width = 4096, int height = 4096)
|
||||
=> CreateTestBitmap(width, height);
|
||||
|
||||
/// <summary>
|
||||
/// 创建标准 Mock IImageProcessingService,注册 DefaultKeys 中的算子
|
||||
/// �𥕦遣��� Mock IImageProcessingService嚗峕釣�?DefaultKeys 銝剔�蝞堒�
|
||||
/// </summary>
|
||||
public static Mock<IImageProcessingService> CreateMockImageService(
|
||||
string[]? keys = null,
|
||||
@@ -73,4 +72,4 @@ namespace XplorePlane.Tests.Helpers
|
||||
public static ProcessorParameter MakeIntParam(string name, int value = 5, int min = 0, int max = 10)
|
||||
=> new ProcessorParameter(name, name, typeof(int), value, min, max);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user