-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...ies/Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests/Windows/ProcessInfoTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.Extensions.Diagnostics.ResourceMonitoring.Windows.Interop; | ||
using Microsoft.TestUtilities; | ||
using Xunit; | ||
|
||
namespace Microsoft.Extensions.Diagnostics.ResourceMonitoring.Windows.Test; | ||
|
||
/// <summary> | ||
/// Process Info Interop Tests. | ||
/// </summary> | ||
/// <remarks>These tests are added for coverage reasons, but the code doesn't have | ||
/// the necessary environment predictability to really test it.</remarks> | ||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX, SkipReason = "Windows specific.")] | ||
public sealed class ProcessInfoTests | ||
{ | ||
[ConditionalFact] | ||
public void GetCurrentProcessMemoryUsage() | ||
{ | ||
var workingSet64 = new ProcessInfo().GetCurrentProcessMemoryUsage(); | ||
Assert.True(workingSet64 > 0); | ||
} | ||
} |