Skip to content

Commit

Permalink
test action Screencap (API 15)
Browse files Browse the repository at this point in the history
  • Loading branch information
moomiji committed Aug 7, 2024
1 parent 3769b35 commit 50f0fa6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
test:
runs-on: macos-13
env:
API_LEVEL: 23
API_LEVEL: 15
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages # NuGet CLI environment variables

steps:
Expand Down
27 changes: 27 additions & 0 deletions src/MaaFramework.Binding.UnitTests/Test_GithubActions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace MaaFramework.Binding.UnitTests;

Check notice on line 1 in src/MaaFramework.Binding.UnitTests/Test_GithubActions.cs

View workflow job for this annotation

GitHub Actions / lint

NamespaceLinter

Skip file

/// <summary>
/// </summary>
[TestClass]
public class Test_GithubActions
{
[TestMethod]
[DataRow(AdbControllerTypes.ScreencapRawByNetcat)]
[DataRow(AdbControllerTypes.ScreencapRawWithGzip)]
[DataRow(AdbControllerTypes.ScreencapEncode)]
[DataRow(AdbControllerTypes.ScreencapEncodeToFile)]
[DataRow(AdbControllerTypes.ScreencapMinicapDirect)]
[DataRow(AdbControllerTypes.ScreencapMinicapStream)]
public void TestAction(AdbControllerTypes sc)
{
using var native = new MaaAdbController(
Common.AdbPath,
Common.Address,
AdbControllerTypes.InputPresetAdb | sc,
Common.AdbConfig,
Common.AgentPath);

Assert.AreEqual(
MaaJobStatus.Failed, native.Screencap().Wait());
}
}

0 comments on commit 50f0fa6

Please sign in to comment.