-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
4f8444e
commit e6e5748
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
tests/HaveIBeenPwned.Client.AcceptanceTests/PwnedClientTests.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,26 @@ | ||
// Copyright (c) David Pine. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace HaveIBeenPwned.Client.AcceptanceTests; | ||
|
||
[Trait("Category", "AcceptanceTests")] | ||
public class PwnedClientTests | ||
{ | ||
private readonly IPwnedClient _pwnedClient; | ||
|
||
public PwnedClientTests() => | ||
_pwnedClient = new PwnedClient( | ||
Environment.GetEnvironmentVariable("HibpOptions__ApiKey")!); | ||
|
||
[Fact] | ||
public async Task GetSubscriptionStatusAsyncReturnsCorrectStatus() | ||
{ | ||
var status = | ||
await _pwnedClient.GetSubscriptionStatusAsync(); | ||
|
||
Assert.NotNull(status); | ||
|
||
var actual = status.GetSubscriptionLevel(); | ||
Assert.Equal(HibpSubscriptionLevel.One, actual); | ||
} | ||
} |