2
0

將寫死改成活讀

This commit is contained in:
DangHome
2023-07-03 01:51:09 +08:00
parent a48d7b8d56
commit a8fd8f3f46
27 changed files with 703 additions and 546 deletions

38
Tester/CommnadTest.cs Normal file
View File

@@ -0,0 +1,38 @@
using CMM.Library.Base;
using CMM.Library.Helpers;
using CMM.Library.Method;
using CMM.Library.ViewModel;
namespace CMM.Tester;
public class CommnadTest
{
[SetUp]
public void Setup()
{
}
[Test]
public async Task Test1()
{
await CMMCommand.ScanMonitor();
var monColle = new ObservableRangeCollection<XMonitor>();
monColle.AddRange(await CMMCommand.ReadMonitorsData());
await CMMCommand.ScanMonitorStatus(monColle);
}
[Test]
public void JsonParserTest()
{
var path = @"C:\Users\shoop\AppData\Local\Temp\CMM\KV97067ICLCL.tmp";
var monitorModel = JsonHelper.JsonFormFile<IEnumerable<SMonitorModel>>(path);
}
[Test]
public async Task GetMonPowerStatus()
{
var status = await CMMCommand.GetMonPowerStatus("CBBP3P3");
}
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>CMM.Tester</RootNamespace>
<Product>ControlMyMonitorManagement</Product>
@@ -18,4 +18,12 @@
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CMMModel\CMMModel.csproj" />
<ProjectReference Include="..\CMMService\CMMService.csproj" />
<ProjectReference Include="..\Language\Language.csproj" />
<ProjectReference Include="..\Library\Library.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,16 +0,0 @@
namespace CMM.Tester
{
public class Tests
{
[SetUp]
public void Setup()
{
}
[Test]
public void Test1()
{
Assert.Pass();
}
}
}