规范类名及命名空间名称
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using FsCheck;
|
||||
using FsCheck.Fluent;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FsCheck;
|
||||
using FsCheck.Fluent;
|
||||
using XplorePlane.Models;
|
||||
|
||||
namespace XplorePlane.Tests.Generators
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using FsCheck;
|
||||
using FsCheck.Fluent;
|
||||
using System;
|
||||
using XplorePlane.Models;
|
||||
|
||||
namespace XplorePlane.Tests.Generators
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using XplorePlane.Models;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
using XplorePlane.Models;
|
||||
|
||||
namespace XplorePlane.Tests.Models
|
||||
{
|
||||
@@ -168,4 +168,4 @@ namespace XplorePlane.Tests.Models
|
||||
Assert.Equal(0, z, precision: 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Xunit;
|
||||
using XplorePlane.ViewModels;
|
||||
using XplorePlane.Tests.Helpers;
|
||||
using System;
|
||||
using XplorePlane.Tests.Helpers;
|
||||
using XplorePlane.ViewModels;
|
||||
using Xunit;
|
||||
|
||||
namespace XplorePlane.Tests.Pipeline
|
||||
{
|
||||
@@ -100,4 +100,4 @@ namespace XplorePlane.Tests.Pipeline
|
||||
Assert.Empty(vm.FilteredOperators);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using Moq;
|
||||
using Xunit;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.ViewModels;
|
||||
using XplorePlane.Tests.Helpers;
|
||||
using XplorePlane.ViewModels;
|
||||
using Xunit;
|
||||
|
||||
namespace XplorePlane.Tests.Pipeline
|
||||
{
|
||||
@@ -276,4 +276,4 @@ namespace XplorePlane.Tests.Pipeline
|
||||
Assert.True(vmMax.IsValueValid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
using Moq;
|
||||
using Xunit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.ViewModels;
|
||||
using XplorePlane.Tests.Helpers;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using XplorePlane.ViewModels;
|
||||
using Xunit;
|
||||
|
||||
namespace XplorePlane.Tests.Pipeline
|
||||
{
|
||||
@@ -212,4 +212,4 @@ namespace XplorePlane.Tests.Pipeline
|
||||
Assert.Equal(new[] { "Blur", "Sharpen", "Threshold" }, executionOrder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using Xunit;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.Tests.Helpers;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
namespace XplorePlane.Tests.Pipeline
|
||||
{
|
||||
@@ -200,4 +200,4 @@ namespace XplorePlane.Tests.Pipeline
|
||||
Assert.Equal(2, result.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,18 +2,17 @@ using FsCheck;
|
||||
using FsCheck.Fluent;
|
||||
using FsCheck.Xunit;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.ViewModels;
|
||||
using XplorePlane.Tests.Helpers;
|
||||
using XplorePlane.ViewModels;
|
||||
|
||||
namespace XplorePlane.Tests.Pipeline
|
||||
{
|
||||
@@ -278,4 +277,4 @@ namespace XplorePlane.Tests.Pipeline
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
using Moq;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Moq;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
using XP.Hardware.RaySource.Services;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services.AppState;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace XplorePlane.Tests.Services
|
||||
{
|
||||
@@ -134,4 +134,4 @@ namespace XplorePlane.Tests.Services
|
||||
Assert.NotEmpty(_service.SystemState.ErrorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
using Moq;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Moq;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
using XplorePlane.Models;
|
||||
using XplorePlane.Services;
|
||||
using XplorePlane.Services.AppState;
|
||||
using XplorePlane.Services.Recipe;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace XplorePlane.Tests.Services
|
||||
{
|
||||
@@ -138,4 +138,4 @@ namespace XplorePlane.Tests.Services
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user