-
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
52ab322
commit 5ab44df
Showing
7 changed files
with
118 additions
and
27 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
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
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
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
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
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
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,29 @@ | ||
// Copyright (c) Dolittle. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System; | ||
using FluentAssertions; | ||
|
||
namespace Dolittle.SDK.Analyzers; | ||
|
||
public class GenerateIdTests | ||
{ | ||
[Fact] | ||
public void WhenGeneratingId() | ||
{ | ||
var id = IdentityGenerator.GenerateRedactionId(); | ||
|
||
id.Should().NotBeEmpty(); | ||
Guid.TryParse(id, out _).Should().BeTrue("Should be a valid Guid"); | ||
} | ||
|
||
[Fact] | ||
public void WhenGeneratingRedactionId() | ||
{ | ||
var id = IdentityGenerator.GenerateRedactionId(); | ||
|
||
id.Should().NotBeEmpty(); | ||
Guid.TryParse(id, out _).Should().BeTrue("Should be a valid Guid"); | ||
id.Should().StartWith("de1e7e17-bad5-da7a-", "Should start with the correct prefix"); | ||
} | ||
} |