Files
FishmanTheMurloc aead279c78 单元测试HelloWorld (#1219)
* AutoFishing为单元测试重构;一个简单的单元测试GetFishpondTest

* 将鼠标操作的注入挪到DesktopRegion中;提供LoadAssetImage的一个不依赖配置的重载;ChooseBait的代码中将Bv的方法替换成不依赖配置的写法;完成ChooseBait的单元测试

* 使用TimeProvider改写ChooseBait以适用单元测试;添加假的绘图上下文类;添加抛竿行为的单元测试

* 选择鱼饵行为比对上次选择的鱼饵,如果相同则直接抛竿(之前的版本曾有此逻辑),但测下来有时会选错饵导致无限抛竿,调整了相关步骤的等待间隔,希望能简单地压制此bug

* 获取鱼群时过滤“获得”界面的鱼图标:1、在Fishpond构造函数中实现。2、配有此类情况的单元测试。3、并由此降低鱼钓上后的等待时间;
修复绘制鱼群时索引不正确导致遗漏的bug;获取鱼群时绘制鱼群供分析
2025-03-05 00:30:11 +08:00

18 lines
512 B
C#
Raw Permalink 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.
namespace BetterGenshinImpact.UnitTest;
public class UnitTest1
{
/// <summary>
/// 测试从Assets目录获取图片结果应为成功。
/// Assets是BGI项目的一个submodule须要单独获取。
/// </summary>
/// <param name="filename"></param>
[Theory]
[InlineData("UI_Icon_Intee_AlchemySim_Dealer.png")]
public void TestGetDataFromAssets(string filename)
{
bool actual = File.Exists(@$"..\..\..\Assets\{filename}");
Assert.True(actual);
}
}