mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 06:11: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
+67
@@ -0,0 +1,67 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Playlists;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.SharedKernel.UnitTests.Common.Enums.Playlists;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="PlaylistMediaItemType"/> enumeration.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PlaylistMediaItemTypeTests
|
||||
{
|
||||
[Fact]
|
||||
public void PlaylistMediaItemType_WhenEnumeratingValues_ShouldHaveNoDuplicateValues()
|
||||
{
|
||||
// Act
|
||||
PlaylistMediaItemType[] values = Enum.GetValues<PlaylistMediaItemType>();
|
||||
|
||||
// Assert
|
||||
Assert.Equal(values.Length, values.Distinct().Count());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PlaylistMediaItemType_WhenEnumeratingNames_ShouldHaveTheTwoDocumentedMembersInOrder()
|
||||
{
|
||||
// Act
|
||||
string[] names = Enum.GetNames<PlaylistMediaItemType>();
|
||||
|
||||
// Assert
|
||||
string[] expectedNames =
|
||||
[
|
||||
nameof(PlaylistMediaItemType.MusicTrack),
|
||||
nameof(PlaylistMediaItemType.VideoFile)
|
||||
];
|
||||
Assert.Equal(expectedNames, names);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PlaylistMediaItemType_WhenEnumeratingValues_ShouldHaveTheDocumentedUnderlyingValues()
|
||||
{
|
||||
// Act
|
||||
PlaylistMediaItemType[] values = Enum.GetValues<PlaylistMediaItemType>();
|
||||
|
||||
// Assert
|
||||
PlaylistMediaItemType[] expectedValues =
|
||||
[
|
||||
PlaylistMediaItemType.MusicTrack,
|
||||
PlaylistMediaItemType.VideoFile
|
||||
];
|
||||
int[] expectedUnderlyingValues = [0, 1];
|
||||
Assert.Equal(expectedValues, values);
|
||||
Assert.Equal(expectedUnderlyingValues, values.Select(value => (int)value));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PlaylistMediaItemType_WhenDefaulted_ShouldBeMusicTrack()
|
||||
{
|
||||
// Act
|
||||
PlaylistMediaItemType mediaItemType = default;
|
||||
|
||||
// Assert
|
||||
Assert.Equal(PlaylistMediaItemType.MusicTrack, mediaItemType);
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Playlists;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.SharedKernel.UnitTests.Common.Enums.Playlists;
|
||||
|
||||
/// <summary>
|
||||
/// Contains unit tests for the <see cref="PlaylistType"/> enumeration.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PlaylistTypeTests
|
||||
{
|
||||
[Fact]
|
||||
public void PlaylistType_WhenEnumeratingValues_ShouldHaveNoDuplicateValues()
|
||||
{
|
||||
// Act
|
||||
PlaylistType[] values = Enum.GetValues<PlaylistType>();
|
||||
|
||||
// Assert
|
||||
Assert.Equal(values.Length, values.Distinct().Count());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PlaylistType_WhenEnumeratingNames_ShouldHaveTheSingleDocumentedMember()
|
||||
{
|
||||
// Act
|
||||
string[] names = Enum.GetNames<PlaylistType>();
|
||||
|
||||
// Assert
|
||||
string[] expectedNames =
|
||||
[
|
||||
nameof(PlaylistType.Music)
|
||||
];
|
||||
Assert.Equal(expectedNames, names);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PlaylistType_WhenEnumeratingValues_ShouldHaveTheDocumentedUnderlyingValues()
|
||||
{
|
||||
// Act
|
||||
PlaylistType[] values = Enum.GetValues<PlaylistType>();
|
||||
|
||||
// Assert
|
||||
PlaylistType[] expectedValues =
|
||||
[
|
||||
PlaylistType.Music
|
||||
];
|
||||
int[] expectedUnderlyingValues = [0];
|
||||
Assert.Equal(expectedValues, values);
|
||||
Assert.Equal(expectedUnderlyingValues, values.Select(value => (int)value));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PlaylistType_WhenDefaulted_ShouldBeMusic()
|
||||
{
|
||||
// Act
|
||||
PlaylistType playlistType = default;
|
||||
|
||||
// Assert
|
||||
Assert.Equal(PlaylistType.Music, playlistType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user