Implement Elevator mock, diagnostics, and unit tests (with tests in subfolder)

This commit is contained in:
peep 2026-02-06 18:59:08 +00:00
parent 05746cbebe
commit 19bc0f1953
188 changed files with 4190 additions and 2045 deletions

43
Diagnostics.cs Normal file
View File

@ -0,0 +1,43 @@
namespace ElevatorDiag;
public record ElevatorHealth(
bool IsHealthy,
ElevatorState State,
int CurrentFloor,
double PrecisePosition,
string? ActiveFault,
int PendingRequestsCount
);
public class ElevatorDiagnostics
{
private readonly Elevator _elevator;
public ElevatorDiagnostics(Elevator elevator)
{
_elevator = elevator;
}
public ElevatorHealth GetHealth()
{
return new ElevatorHealth(
_elevator.State != ElevatorState.Faulted,
_elevator.State,
_elevator.CurrentFloor,
_elevator.CurrentPosition,
_elevator.LastFault,
_elevator.TargetFloors.Count
);
}
public string GetStatusReport()
{
var health = GetHealth();
return $"[Elevator Report]\n" +
$"Status: {(health.IsHealthy ? "OK" : "FAULTED")}\n" +
$"State: {health.State}\n" +
$"Floor: {health.CurrentFloor} ({health.PrecisePosition:F2})\n" +
$"Pending: {health.PendingRequestsCount} floors\n" +
(health.ActiveFault != null ? $"Fault Detail: {health.ActiveFault}\n" : "");
}
}

108
Elevator.cs Normal file
View File

@ -0,0 +1,108 @@
namespace ElevatorDiag;
public enum ElevatorState
{
Idle,
MovingUp,
MovingDown,
DoorOpen,
Faulted
}
public class Elevator
{
public int CurrentFloor { get; private set; } = 1;
public double CurrentPosition { get; private set; } = 1.0;
public ElevatorState State { get; private set; } = ElevatorState.Idle;
public List<int> TargetFloors { get; } = new();
public string? LastFault { get; private set; }
private const double Speed = 0.5; // floors per tick
private const int DoorHoldTicks = 3;
private int _doorTimer = 0;
public void RequestFloor(int floor)
{
if (State == ElevatorState.Faulted) return;
if (!TargetFloors.Contains(floor))
{
TargetFloors.Add(floor);
// No automatic sort here, we'll handle direction in GetNextTarget
}
}
public void Update()
{
if (State == ElevatorState.Faulted) return;
if (State == ElevatorState.DoorOpen)
{
_doorTimer++;
if (_doorTimer >= DoorHoldTicks)
{
_doorTimer = 0;
State = ElevatorState.Idle;
}
return;
}
if (TargetFloors.Count == 0)
{
State = ElevatorState.Idle;
return;
}
int target = GetNextTarget();
if (CurrentPosition < target)
{
State = ElevatorState.MovingUp;
CurrentPosition += Speed;
}
else if (CurrentPosition > target)
{
State = ElevatorState.MovingDown;
CurrentPosition -= Speed;
}
CurrentFloor = (int)Math.Round(CurrentPosition);
if (Math.Abs(CurrentPosition - target) < 0.01)
{
CurrentPosition = target;
CurrentFloor = target;
TargetFloors.Remove(target);
State = ElevatorState.DoorOpen;
}
}
private int GetNextTarget()
{
// Simple logic: if moving, keep moving in same direction if targets exist
if (State == ElevatorState.MovingUp)
{
var up = TargetFloors.Where(f => f > CurrentPosition).OrderBy(f => f).FirstOrDefault();
if (up != 0) return up;
}
if (State == ElevatorState.MovingDown)
{
var down = TargetFloors.Where(f => f < CurrentPosition).OrderByDescending(f => f).FirstOrDefault();
if (down != 0) return down;
}
// Closest if idle or changed direction
return TargetFloors.OrderBy(f => Math.Abs(f - CurrentPosition)).First();
}
public void TriggerFault(string reason)
{
State = ElevatorState.Faulted;
LastFault = reason;
}
public void ResetFault()
{
State = ElevatorState.Idle;
LastFault = null;
}
}

View File

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ElevatorDiag\ElevatorDiag.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,66 @@
using ElevatorDiag;
namespace ElevatorDiag.Tests;
public class ElevatorTests
{
[Fact]
public void RequestFloor_MovesToFloor()
{
var elevator = new Elevator();
elevator.RequestFloor(3);
// Floor 1 to 3 at 0.5/tick = 4 ticks to move
// T1: Pos 1.5, T2: Pos 2.0, T3: Pos 2.5, T4: Pos 3.0 (DoorOpen)
for(int i = 0; i < 4; i++) elevator.Update();
Assert.Equal(3, elevator.CurrentFloor);
Assert.Equal(ElevatorState.DoorOpen, elevator.State);
}
[Fact]
public void Fault_StopsMovement()
{
var elevator = new Elevator();
elevator.RequestFloor(5);
elevator.Update(); // Start moving (Pos 1.5)
elevator.TriggerFault("Emergency Stop");
var posBefore = elevator.CurrentPosition;
elevator.Update();
Assert.Equal(ElevatorState.Faulted, elevator.State);
Assert.Equal(posBefore, elevator.CurrentPosition);
}
[Fact]
public void Priority_HandlesMultipleRequests()
{
var elevator = new Elevator();
// Requests 5 then 2. From 1, it should go 1 -> 2 -> 5.
elevator.RequestFloor(5);
elevator.RequestFloor(2);
// Tick 1: Moving to 2 (Pos 1.5)
elevator.Update();
// Tick 2: Arrives at 2 (Pos 2.0, DoorOpen)
elevator.Update();
Assert.Equal(2, elevator.CurrentFloor);
Assert.Equal(ElevatorState.DoorOpen, elevator.State);
}
[Fact]
public void Diagnostics_ReportsCorrectState()
{
var elevator = new Elevator();
var diag = new ElevatorDiagnostics(elevator);
elevator.TriggerFault("Sensor Failure");
var health = diag.GetHealth();
Assert.False(health.IsHealthy);
Assert.Equal("Sensor Failure", health.ActiveFault);
}
}

View File

@ -0,0 +1,10 @@
namespace ElevatorDiag.Tests;
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}

Binary file not shown.

View File

@ -0,0 +1,580 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v10.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v10.0": {
"ElevatorDiag.Tests/1.0.0": {
"dependencies": {
"ElevatorDiag": "1.0.0",
"Microsoft.NET.Test.Sdk": "17.14.1",
"xunit": "2.9.3"
},
"runtime": {
"ElevatorDiag.Tests.dll": {}
}
},
"Microsoft.CodeCoverage/17.14.1": {
"runtime": {
"lib/net8.0/Microsoft.VisualStudio.CodeCoverage.Shim.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.225.12603"
}
}
},
"Microsoft.NET.Test.Sdk/17.14.1": {
"dependencies": {
"Microsoft.CodeCoverage": "17.14.1",
"Microsoft.TestPlatform.TestHost": "17.14.1"
}
},
"Microsoft.TestPlatform.ObjectModel/17.14.1": {
"runtime": {
"lib/net8.0/Microsoft.TestPlatform.CoreUtilities.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
},
"lib/net8.0/Microsoft.TestPlatform.PlatformAbstractions.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
},
"lib/net8.0/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
}
},
"resources": {
"lib/net8.0/cs/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "cs"
},
"lib/net8.0/cs/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "cs"
},
"lib/net8.0/de/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "de"
},
"lib/net8.0/de/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "de"
},
"lib/net8.0/es/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "es"
},
"lib/net8.0/es/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "es"
},
"lib/net8.0/fr/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "fr"
},
"lib/net8.0/fr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "fr"
},
"lib/net8.0/it/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "it"
},
"lib/net8.0/it/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "it"
},
"lib/net8.0/ja/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "ja"
},
"lib/net8.0/ja/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "ja"
},
"lib/net8.0/ko/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "ko"
},
"lib/net8.0/ko/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "ko"
},
"lib/net8.0/pl/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "pl"
},
"lib/net8.0/pl/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "pl"
},
"lib/net8.0/pt-BR/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "pt-BR"
},
"lib/net8.0/pt-BR/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "pt-BR"
},
"lib/net8.0/ru/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "ru"
},
"lib/net8.0/ru/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "ru"
},
"lib/net8.0/tr/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "tr"
},
"lib/net8.0/tr/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "tr"
},
"lib/net8.0/zh-Hans/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "zh-Hans"
},
"lib/net8.0/zh-Hans/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "zh-Hans"
},
"lib/net8.0/zh-Hant/Microsoft.TestPlatform.CoreUtilities.resources.dll": {
"locale": "zh-Hant"
},
"lib/net8.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll": {
"locale": "zh-Hant"
}
}
},
"Microsoft.TestPlatform.TestHost/17.14.1": {
"dependencies": {
"Microsoft.TestPlatform.ObjectModel": "17.14.1",
"Newtonsoft.Json": "13.0.3"
},
"runtime": {
"lib/net8.0/Microsoft.TestPlatform.CommunicationUtilities.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
},
"lib/net8.0/Microsoft.TestPlatform.CrossPlatEngine.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
},
"lib/net8.0/Microsoft.TestPlatform.Utilities.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
},
"lib/net8.0/Microsoft.VisualStudio.TestPlatform.Common.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
},
"lib/net8.0/testhost.dll": {
"assemblyVersion": "15.0.0.0",
"fileVersion": "17.1400.125.30202"
}
},
"resources": {
"lib/net8.0/cs/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "cs"
},
"lib/net8.0/cs/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "cs"
},
"lib/net8.0/cs/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "cs"
},
"lib/net8.0/de/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "de"
},
"lib/net8.0/de/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "de"
},
"lib/net8.0/de/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "de"
},
"lib/net8.0/es/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "es"
},
"lib/net8.0/es/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "es"
},
"lib/net8.0/es/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "es"
},
"lib/net8.0/fr/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "fr"
},
"lib/net8.0/fr/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "fr"
},
"lib/net8.0/fr/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "fr"
},
"lib/net8.0/it/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "it"
},
"lib/net8.0/it/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "it"
},
"lib/net8.0/it/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "it"
},
"lib/net8.0/ja/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "ja"
},
"lib/net8.0/ja/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "ja"
},
"lib/net8.0/ja/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "ja"
},
"lib/net8.0/ko/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "ko"
},
"lib/net8.0/ko/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "ko"
},
"lib/net8.0/ko/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "ko"
},
"lib/net8.0/pl/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "pl"
},
"lib/net8.0/pl/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "pl"
},
"lib/net8.0/pl/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "pl"
},
"lib/net8.0/pt-BR/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "pt-BR"
},
"lib/net8.0/pt-BR/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "pt-BR"
},
"lib/net8.0/pt-BR/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "pt-BR"
},
"lib/net8.0/ru/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "ru"
},
"lib/net8.0/ru/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "ru"
},
"lib/net8.0/ru/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "ru"
},
"lib/net8.0/tr/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "tr"
},
"lib/net8.0/tr/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "tr"
},
"lib/net8.0/tr/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "tr"
},
"lib/net8.0/zh-Hans/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "zh-Hans"
},
"lib/net8.0/zh-Hans/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "zh-Hans"
},
"lib/net8.0/zh-Hans/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "zh-Hans"
},
"lib/net8.0/zh-Hant/Microsoft.TestPlatform.CommunicationUtilities.resources.dll": {
"locale": "zh-Hant"
},
"lib/net8.0/zh-Hant/Microsoft.TestPlatform.CrossPlatEngine.resources.dll": {
"locale": "zh-Hant"
},
"lib/net8.0/zh-Hant/Microsoft.VisualStudio.TestPlatform.Common.resources.dll": {
"locale": "zh-Hant"
}
}
},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.3.27908"
}
}
},
"runtime.linux-arm.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/8.0.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "8.0.0",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "8.0.0",
"runtime.linux-x64.runtime.native.System.IO.Ports": "8.0.0",
"runtime.osx-arm64.runtime.native.System.IO.Ports": "8.0.0",
"runtime.osx-x64.runtime.native.System.IO.Ports": "8.0.0"
}
},
"runtime.osx-arm64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
"rid": "osx-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"Spectre.Console/0.49.1": {
"runtime": {
"lib/net8.0/Spectre.Console.dll": {
"assemblyVersion": "0.0.0.0",
"fileVersion": "0.49.1.0"
}
}
},
"System.IO.Ports/8.0.0": {
"dependencies": {
"runtime.native.System.IO.Ports": "8.0.0"
},
"runtime": {
"lib/net8.0/System.IO.Ports.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net8.0/System.IO.Ports.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
},
"runtimes/win/lib/net8.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
"xunit/2.9.3": {
"dependencies": {
"xunit.assert": "2.9.3",
"xunit.core": "2.9.3"
}
},
"xunit.abstractions/2.0.3": {
"runtime": {
"lib/netstandard2.0/xunit.abstractions.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "0.0.0.0"
}
}
},
"xunit.assert/2.9.3": {
"runtime": {
"lib/net6.0/xunit.assert.dll": {
"assemblyVersion": "2.9.3.0",
"fileVersion": "2.9.3.0"
}
}
},
"xunit.core/2.9.3": {
"dependencies": {
"xunit.extensibility.core": "2.9.3",
"xunit.extensibility.execution": "2.9.3"
}
},
"xunit.extensibility.core/2.9.3": {
"dependencies": {
"xunit.abstractions": "2.0.3"
},
"runtime": {
"lib/netstandard1.1/xunit.core.dll": {
"assemblyVersion": "2.9.3.0",
"fileVersion": "2.9.3.0"
}
}
},
"xunit.extensibility.execution/2.9.3": {
"dependencies": {
"xunit.extensibility.core": "2.9.3"
},
"runtime": {
"lib/netstandard1.1/xunit.execution.dotnet.dll": {
"assemblyVersion": "2.9.3.0",
"fileVersion": "2.9.3.0"
}
}
},
"ElevatorDiag/1.0.0": {
"dependencies": {
"Spectre.Console": "0.49.1",
"System.IO.Ports": "8.0.0"
},
"runtime": {
"ElevatorDiag.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.0.0.0"
}
}
}
}
},
"libraries": {
"ElevatorDiag.Tests/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.CodeCoverage/17.14.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==",
"path": "microsoft.codecoverage/17.14.1",
"hashPath": "microsoft.codecoverage.17.14.1.nupkg.sha512"
},
"Microsoft.NET.Test.Sdk/17.14.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==",
"path": "microsoft.net.test.sdk/17.14.1",
"hashPath": "microsoft.net.test.sdk.17.14.1.nupkg.sha512"
},
"Microsoft.TestPlatform.ObjectModel/17.14.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==",
"path": "microsoft.testplatform.objectmodel/17.14.1",
"hashPath": "microsoft.testplatform.objectmodel.17.14.1.nupkg.sha512"
},
"Microsoft.TestPlatform.TestHost/17.14.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==",
"path": "microsoft.testplatform.testhost/17.14.1",
"hashPath": "microsoft.testplatform.testhost.17.14.1.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
"path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
},
"runtime.linux-arm.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gK720fg6HemDg8sXcfy+xCMZ9+hF78Gc7BmREbmkS4noqlu1BAr9qZtuWGhLzFjBfgecmdtl4+SYVwJ1VneZBQ==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KYG6/3ojhEWbb3FwQAKgGWPHrY+HKUXXdVjJlrtyCLn3EMcNTaNcPadb2c0ndQzixZSmAxZKopXJr0nLwhOrpQ==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Wnw5vhA4mgGbIFoo6l9Fk3iEcwRSq49a1aKwJgXUCUtEQLCSUDjTGSxqy/oMUuOyyn7uLHsH8KgZzQ1y3lReiQ==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ee7Sz5llLpTgyKIWzKI/GeuRSbFkOABgJRY00SqTY0OkTYtkB+9l5rFZfE7fxPA3c22RfytCBYkUdAkcmwMjQg==",
"path": "runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.osx-arm64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rbUBLAaFW9oVkbsb0+XSrAo2QdhBeAyzLl5KQ6Oci9L/u626uXGKInsVJG6B9Z5EO8bmplC8tsMiaHK8wOBZ+w==",
"path": "runtime.osx-arm64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IcfB4jKtM9pkzP9OpYelEcUX1MiDt0IJPBh3XYYdEISFF+6Mc+T8WWi0dr9wVh1gtcdVjubVEIBgB8BHESlGfQ==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"Spectre.Console/0.49.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-USV+pdu49OJ3nCjxNuw1K9Zw/c1HCBbwbjXZp0EOn6wM99tFdAtN34KEBZUMyRuJuXlUMDqhd8Yq9obW2MslYA==",
"path": "spectre.console/0.49.1",
"hashPath": "spectre.console.0.49.1.nupkg.sha512"
},
"System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-MaiPbx2/QXZc62gm/DrajRrGPG1lU4m08GWMoWiymPYM+ba4kfACp2PbiYpqJ4QiFGhHD00zX3RoVDTucjWe9g==",
"path": "system.io.ports/8.0.0",
"hashPath": "system.io.ports.8.0.0.nupkg.sha512"
},
"xunit/2.9.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==",
"path": "xunit/2.9.3",
"hashPath": "xunit.2.9.3.nupkg.sha512"
},
"xunit.abstractions/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==",
"path": "xunit.abstractions/2.0.3",
"hashPath": "xunit.abstractions.2.0.3.nupkg.sha512"
},
"xunit.assert/2.9.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/Kq28fCE7MjOV42YLVRAJzRF0WmEqsmflm0cfpMjGtzQ2lR5mYVj1/i0Y8uDAOLczkL3/jArrwehfMD0YogMAA==",
"path": "xunit.assert/2.9.3",
"hashPath": "xunit.assert.2.9.3.nupkg.sha512"
},
"xunit.core/2.9.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==",
"path": "xunit.core/2.9.3",
"hashPath": "xunit.core.2.9.3.nupkg.sha512"
},
"xunit.extensibility.core/2.9.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kf3si0YTn2a8J8eZNb+zFpwfoyvIrQ7ivNk5ZYA5yuYk1bEtMe4DxJ2CF/qsRgmEnDr7MnW1mxylBaHTZ4qErA==",
"path": "xunit.extensibility.core/2.9.3",
"hashPath": "xunit.extensibility.core.2.9.3.nupkg.sha512"
},
"xunit.extensibility.execution/2.9.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-yMb6vMESlSrE3Wfj7V6cjQ3S4TXdXpRqYeNEI3zsX31uTsGMJjEw6oD5F5u1cHnMptjhEECnmZSsPxB6ChZHDQ==",
"path": "xunit.extensibility.execution/2.9.3",
"hashPath": "xunit.extensibility.execution.2.9.3.nupkg.sha512"
},
"ElevatorDiag/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@ -0,0 +1,13 @@
{
"runtimeOptions": {
"tfm": "net10.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "10.0.0"
},
"configProperties": {
"MSTest.EnableParentProcessQuery": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@ -0,0 +1,170 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"ElevatorDiag/1.0.0": {
"dependencies": {
"Spectre.Console": "0.49.1",
"System.IO.Ports": "8.0.0"
},
"runtime": {
"ElevatorDiag.dll": {}
}
},
"runtime.linux-arm.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/linux-arm/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/linux-arm64/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.linux-x64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/linux-x64/native/libSystem.IO.Ports.Native.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.native.System.IO.Ports/8.0.0": {
"dependencies": {
"runtime.linux-arm.runtime.native.System.IO.Ports": "8.0.0",
"runtime.linux-arm64.runtime.native.System.IO.Ports": "8.0.0",
"runtime.linux-x64.runtime.native.System.IO.Ports": "8.0.0",
"runtime.osx-arm64.runtime.native.System.IO.Ports": "8.0.0",
"runtime.osx-x64.runtime.native.System.IO.Ports": "8.0.0"
}
},
"runtime.osx-arm64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/osx-arm64/native/libSystem.IO.Ports.Native.dylib": {
"rid": "osx-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"runtime.osx-x64.runtime.native.System.IO.Ports/8.0.0": {
"runtimeTargets": {
"runtimes/osx-x64/native/libSystem.IO.Ports.Native.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"Spectre.Console/0.49.1": {
"runtime": {
"lib/net8.0/Spectre.Console.dll": {
"assemblyVersion": "0.0.0.0",
"fileVersion": "0.49.1.0"
}
}
},
"System.IO.Ports/8.0.0": {
"dependencies": {
"runtime.native.System.IO.Ports": "8.0.0"
},
"runtime": {
"lib/net8.0/System.IO.Ports.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net8.0/System.IO.Ports.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
},
"runtimes/win/lib/net8.0/System.IO.Ports.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
}
}
},
"libraries": {
"ElevatorDiag/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"runtime.linux-arm.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-gK720fg6HemDg8sXcfy+xCMZ9+hF78Gc7BmREbmkS4noqlu1BAr9qZtuWGhLzFjBfgecmdtl4+SYVwJ1VneZBQ==",
"path": "runtime.linux-arm.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.linux-arm.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.linux-arm64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KYG6/3ojhEWbb3FwQAKgGWPHrY+HKUXXdVjJlrtyCLn3EMcNTaNcPadb2c0ndQzixZSmAxZKopXJr0nLwhOrpQ==",
"path": "runtime.linux-arm64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.linux-arm64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.linux-x64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Wnw5vhA4mgGbIFoo6l9Fk3iEcwRSq49a1aKwJgXUCUtEQLCSUDjTGSxqy/oMUuOyyn7uLHsH8KgZzQ1y3lReiQ==",
"path": "runtime.linux-x64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.linux-x64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ee7Sz5llLpTgyKIWzKI/GeuRSbFkOABgJRY00SqTY0OkTYtkB+9l5rFZfE7fxPA3c22RfytCBYkUdAkcmwMjQg==",
"path": "runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.osx-arm64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rbUBLAaFW9oVkbsb0+XSrAo2QdhBeAyzLl5KQ6Oci9L/u626uXGKInsVJG6B9Z5EO8bmplC8tsMiaHK8wOBZ+w==",
"path": "runtime.osx-arm64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.osx-arm64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"runtime.osx-x64.runtime.native.System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IcfB4jKtM9pkzP9OpYelEcUX1MiDt0IJPBh3XYYdEISFF+6Mc+T8WWi0dr9wVh1gtcdVjubVEIBgB8BHESlGfQ==",
"path": "runtime.osx-x64.runtime.native.system.io.ports/8.0.0",
"hashPath": "runtime.osx-x64.runtime.native.system.io.ports.8.0.0.nupkg.sha512"
},
"Spectre.Console/0.49.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-USV+pdu49OJ3nCjxNuw1K9Zw/c1HCBbwbjXZp0EOn6wM99tFdAtN34KEBZUMyRuJuXlUMDqhd8Yq9obW2MslYA==",
"path": "spectre.console/0.49.1",
"hashPath": "spectre.console.0.49.1.nupkg.sha512"
},
"System.IO.Ports/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-MaiPbx2/QXZc62gm/DrajRrGPG1lU4m08GWMoWiymPYM+ba4kfACp2PbiYpqJ4QiFGhHD00zX3RoVDTucjWe9g==",
"path": "system.io.ports/8.0.0",
"hashPath": "system.io.ports.8.0.0.nupkg.sha512"
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More