mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Replaces ErrorOr library with a custom implementation.
This commit is contained in:
1 parent
8fe90a4dde
commit
3b772d68ca
436 files changed
+4234
-3922
No files matched your search
+6
-6
@@ -1,7 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
|
||||
using Lumina.Contracts.Responses.FileSystemManagement.Path;
|
||||
using Lumina.Domain.Common.Primitives;
|
||||
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -20,8 +20,8 @@ public class PathSegmentMappingTests
|
||||
public void ToResponse_WhenMappingPathSegment_ShouldMapCorrectly()
|
||||
{
|
||||
// Arrange
|
||||
ErrorOr<PathSegment> createResult = PathSegment.Create("TestSegment", true, false);
|
||||
Assert.False(createResult.IsError);
|
||||
Result<PathSegment> createResult = PathSegment.Create("TestSegment", true, false);
|
||||
Assert.False(createResult.IsFailure);
|
||||
PathSegment pathSegment = createResult.Value;
|
||||
|
||||
// Act
|
||||
@@ -39,8 +39,8 @@ public class PathSegmentMappingTests
|
||||
public void ToResponse_WhenMappingDifferentPathSegmentTypes_ShouldMapCorrectly(string name, bool isDirectory, bool isDrive)
|
||||
{
|
||||
// Arrange
|
||||
ErrorOr<PathSegment> createResult = PathSegment.Create(name, isDirectory, isDrive);
|
||||
Assert.False(createResult.IsError);
|
||||
Result<PathSegment> createResult = PathSegment.Create(name, isDirectory, isDrive);
|
||||
Assert.False(createResult.IsFailure);
|
||||
PathSegment pathSegment = createResult.Value;
|
||||
|
||||
// Act
|
||||
@@ -69,7 +69,7 @@ public class PathSegmentMappingTests
|
||||
// Assert
|
||||
Assert.NotNull(results);
|
||||
Assert.Equal(pathSegments.Count, results.Count());
|
||||
List<PathSegmentResponse> resultList = results.ToList();
|
||||
List<PathSegmentResponse> resultList = [.. results];
|
||||
for (int i = 0; i < pathSegments.Count; i++)
|
||||
Assert.Equal(pathSegments[i].Name, resultList[i].Path);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user