-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Async method to generate unique id
- Loading branch information
Showing
12 changed files
with
175 additions
and
84 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
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,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using SnowflakeId.Core; | ||
|
||
namespace SnowflakeId.Tests | ||
{ | ||
public class SnowflakeIdConfigTest | ||
{ | ||
[Fact] | ||
public void SnowflakeIdConfig_TotalBits_Lenght_Is_64() | ||
{ | ||
Assert.Equal(64, SnowflakeIdConfig.TotalBits); | ||
} | ||
|
||
[Fact] | ||
public void SnowflakeIdConfig_EpochBits_Length_Is_42() | ||
{ | ||
Assert.Equal(42, SnowflakeIdConfig.EpochBits); | ||
} | ||
|
||
[Fact] | ||
public void SnowflakeIdConfig_MachineIdBits_Length_Is_10() | ||
{ | ||
Assert.Equal(10, SnowflakeIdConfig.MachineIdBits); | ||
} | ||
|
||
[Fact] | ||
public void SnowflakeIdConfig_SequenceBits_Length_Is_12() | ||
{ | ||
Assert.Equal(12, SnowflakeIdConfig.SequenceBits); | ||
} | ||
|
||
[Fact] | ||
public void SnowflakeIdConfig_MaxMachineId_Is_Equal_1023() | ||
{ | ||
Assert.Equal(1023, SnowflakeIdConfig.MaxMachineId); | ||
} | ||
|
||
[Fact] | ||
public void SnowflakeIdConfig_MaxSequenceId_Is_Equal_4095() | ||
{ | ||
Assert.Equal(4095, SnowflakeIdConfig.MaxSequenceId); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.