规范类名及命名空间名称

This commit is contained in:
李伟
2026-04-13 14:35:37 +08:00
parent c430ec229b
commit ace1c70ddf
217 changed files with 1271 additions and 1384 deletions
+8 -9
View File
@@ -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);
}
}
}