NavisworksTransport/TestRunner.cs

86 lines
2.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using NavisworksTransport.UnitTests;
namespace TestRunner
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("开始运行A*算法调试测试...");
var tester = new AStarDebuggingTest();
try
{
Console.WriteLine("=== 基础障碍物避让测试 ===");
tester.TestBasicObstacleAvoidance();
Console.WriteLine("✅ 基础障碍物避让测试通过");
}
catch (Exception ex)
{
Console.WriteLine($"❌ 基础障碍物避让测试失败: {ex.Message}");
}
try
{
Console.WriteLine("\n=== 坐标映射验证测试 ===");
tester.TestCoordinateMapping();
Console.WriteLine("✅ 坐标映射验证测试通过");
}
catch (Exception ex)
{
Console.WriteLine($"❌ 坐标映射验证测试失败: {ex.Message}");
}
try
{
Console.WriteLine("\n=== 实际问题场景重现测试 ===");
tester.TestActualProblemScenario();
Console.WriteLine("✅ 实际问题场景重现测试通过");
}
catch (Exception ex)
{
Console.WriteLine($"❌ 实际问题场景重现测试失败: {ex.Message}");
}
try
{
Console.WriteLine("\n=== 网格连接状态检查测试 ===");
tester.TestGridConnectionState();
Console.WriteLine("✅ 网格连接状态检查测试通过");
}
catch (Exception ex)
{
Console.WriteLine($"❌ 网格连接状态检查测试失败: {ex.Message}");
}
try
{
Console.WriteLine("\n=== 真实坐标系统A*算法测试 ===");
tester.TestWithRealCoordinateSystem();
Console.WriteLine("✅ 真实坐标系统A*算法测试通过");
}
catch (Exception ex)
{
Console.WriteLine($"❌ 真实坐标系统A*算法测试失败: {ex.Message}");
Console.WriteLine($"详细错误信息: {ex}");
}
try
{
Console.WriteLine("\n=== 通道路径查找测试 ===");
tester.TestChannelPathfinding();
Console.WriteLine("✅ 通道路径查找测试通过");
}
catch (Exception ex)
{
Console.WriteLine($"❌ 通道路径查找测试失败: {ex.Message}");
Console.WriteLine($"详细错误信息: {ex}");
}
Console.WriteLine("\n测试完成按任意键退出...");
Console.ReadKey();
}
}
}