mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 13:01:10 +00:00
Renames project paths from Lumina to Nemera
This commit is contained in:
1 parent
ce6fddb4c9
commit
0f659a4877
6450 files changed
No files matched your search
+49
@@ -0,0 +1,49 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Services;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.UnitTests.Common.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="ScriptIdentifierHelper"/> class.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ScriptIdentifierHelperTests
|
||||
{
|
||||
[Fact]
|
||||
public void GenerateScriptId_WhenCalled_ShouldReturnScriptPrefixedIdentifier()
|
||||
{
|
||||
// Act
|
||||
string scriptId = ScriptIdentifierHelper.GenerateScriptId();
|
||||
|
||||
// Assert
|
||||
Assert.StartsWith("script_", scriptId);
|
||||
Assert.True(Guid.TryParse(scriptId.AsSpan("script_".Length), out _));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GenerateScriptId_WhenCalledTwice_ShouldReturnDistinctIdentifiers()
|
||||
{
|
||||
// Act
|
||||
string firstScriptId = ScriptIdentifierHelper.GenerateScriptId();
|
||||
string secondScriptId = ScriptIdentifierHelper.GenerateScriptId();
|
||||
|
||||
// Assert
|
||||
Assert.NotEqual(firstScriptId, secondScriptId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ClearIdentifier_WhenCalledWithGeneratedIdentifier_ShouldNotThrow()
|
||||
{
|
||||
// Arrange
|
||||
string scriptId = ScriptIdentifierHelper.GenerateScriptId();
|
||||
|
||||
// Act
|
||||
ScriptIdentifierHelper.ClearIdentifier(scriptId);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(scriptId);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user