Removes FluentAssertions library from test projects, due to licensing changes

This commit is contained in:
BinaryAlley committed 2025-02-03 00:31:15 +02:00
1 parent c1100e5398
commit d46bfae4fc
235 files changed
+4468 -4725

No files matched your search

@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture;
using AutoFixture.AutoNSubstitute;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Application.Core.FileSystemManagement.Paths.Queries.CheckPathExists;
using Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -38,9 +37,9 @@ public class CheckPathExistsRequestMappingTests
CheckPathExistsQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(request.Path);
result.IncludeHiddenElements.Should().Be(request.IncludeHiddenElements);
Assert.NotNull(result);
Assert.Equal(request.Path, result.Path);
Assert.Equal(request.IncludeHiddenElements, result.IncludeHiddenElements);
}
[Theory]
@@ -56,9 +55,9 @@ public class CheckPathExistsRequestMappingTests
CheckPathExistsQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(path);
result.IncludeHiddenElements.Should().Be(includeHiddenElements);
Assert.NotNull(result);
Assert.Equal(path, result.Path);
Assert.Equal(includeHiddenElements, result.IncludeHiddenElements);
}
[Fact]
@@ -71,12 +70,12 @@ public class CheckPathExistsRequestMappingTests
List<CheckPathExistsQuery> results = requests.Select(r => r.ToQuery()).ToList();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(requests.Count);
Assert.NotNull(results);
Assert.Equal(requests.Count, results.Count);
for (int i = 0; i < requests.Count; i++)
{
results[i].Path.Should().Be(requests[i].Path);
results[i].IncludeHiddenElements.Should().Be(requests[i].IncludeHiddenElements);
Assert.Equal(requests[i].Path, results[i].Path);
Assert.Equal(requests[i].IncludeHiddenElements, results[i].IncludeHiddenElements);
}
}
}
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture;
using AutoFixture.AutoNSubstitute;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Application.Core.FileSystemManagement.Paths.Commands.CombinePath;
using Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -38,9 +37,9 @@ public class CombinePathRequestMappingTests
CombinePathCommand result = request.ToCommand();
// Assert
result.Should().NotBeNull();
result.OriginalPath.Should().Be(request.OriginalPath);
result.NewPath.Should().Be(request.NewPath);
Assert.NotNull(result);
Assert.Equal(request.OriginalPath, result.OriginalPath);
Assert.Equal(request.NewPath, result.NewPath);
}
[Theory]
@@ -56,9 +55,9 @@ public class CombinePathRequestMappingTests
CombinePathCommand result = request.ToCommand();
// Assert
result.Should().NotBeNull();
result.OriginalPath.Should().Be(originalPath);
result.NewPath.Should().Be(newPath);
Assert.NotNull(result);
Assert.Equal(originalPath, result.OriginalPath);
Assert.Equal(newPath, result.NewPath);
}
[Fact]
@@ -71,12 +70,12 @@ public class CombinePathRequestMappingTests
List<CombinePathCommand> results = requests.Select(r => r.ToCommand()).ToList();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(requests.Count);
Assert.NotNull(results);
Assert.Equal(requests.Count, results.Count);
for (int i = 0; i < requests.Count; i++)
{
results[i].OriginalPath.Should().Be(requests[i].OriginalPath);
results[i].NewPath.Should().Be(requests[i].NewPath);
Assert.Equal(requests[i].OriginalPath, results[i].OriginalPath);
Assert.Equal(requests[i].NewPath, results[i].NewPath);
}
}
}
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture;
using AutoFixture.AutoNSubstitute;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Application.Core.FileSystemManagement.Paths.Queries.GetPathParent;
using Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -38,8 +37,8 @@ public class GetPathParentRequestMappingTests
GetPathParentQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(request.Path);
Assert.NotNull(result);
Assert.Equal(request.Path, result.Path);
}
[Theory]
@@ -55,8 +54,8 @@ public class GetPathParentRequestMappingTests
GetPathParentQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(path);
Assert.NotNull(result);
Assert.Equal(path, result.Path);
}
[Fact]
@@ -69,11 +68,11 @@ public class GetPathParentRequestMappingTests
List<GetPathParentQuery> results = requests.Select(r => r.ToQuery()).ToList();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(requests.Count);
Assert.NotNull(results);
Assert.Equal(requests.Count, results.Count);
for (int i = 0; i < requests.Count; i++)
{
results[i].Path.Should().Be(requests[i].Path);
Assert.Equal(requests[i].Path, results[i].Path);
}
}
}
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture;
using AutoFixture.AutoNSubstitute;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Application.Core.FileSystemManagement.Paths.Queries.GetPathRoot;
using Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -38,8 +37,8 @@ public class GetPathRootRequestMappingTests
GetPathRootQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(request.Path);
Assert.NotNull(result);
Assert.Equal(request.Path, result.Path);
}
[Theory]
@@ -56,8 +55,8 @@ public class GetPathRootRequestMappingTests
GetPathRootQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(path);
Assert.NotNull(result);
Assert.Equal(path, result.Path);
}
[Fact]
@@ -70,11 +69,11 @@ public class GetPathRootRequestMappingTests
List<GetPathRootQuery> results = requests.Select(r => r.ToQuery()).ToList();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(requests.Count);
Assert.NotNull(results);
Assert.Equal(requests.Count, results.Count);
for (int i = 0; i < requests.Count; i++)
{
results[i].Path.Should().Be(requests[i].Path);
Assert.Equal(requests[i].Path, results[i].Path);
}
}
}
@@ -1,6 +1,5 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Contracts.Responses.FileSystemManagement.Path;
using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects;
@@ -22,15 +21,15 @@ public class PathSegmentMappingTests
{
// Arrange
ErrorOr<PathSegment> createResult = PathSegment.Create("TestSegment", true, false);
createResult.IsError.Should().BeFalse();
Assert.False(createResult.IsError);
PathSegment pathSegment = createResult.Value;
// Act
PathSegmentResponse result = pathSegment.ToResponse();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(pathSegment.Name);
Assert.NotNull(result);
Assert.Equal(pathSegment.Name, result.Path);
}
[Theory]
@@ -41,15 +40,15 @@ public class PathSegmentMappingTests
{
// Arrange
ErrorOr<PathSegment> createResult = PathSegment.Create(name, isDirectory, isDrive);
createResult.IsError.Should().BeFalse();
Assert.False(createResult.IsError);
PathSegment pathSegment = createResult.Value;
// Act
PathSegmentResponse result = pathSegment.ToResponse();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(pathSegment.Name);
Assert.NotNull(result);
Assert.Equal(pathSegment.Name, result.Path);
}
[Fact]
@@ -68,10 +67,10 @@ public class PathSegmentMappingTests
IEnumerable<PathSegmentResponse> results = pathSegments.ToResponses();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(pathSegments.Count);
Assert.NotNull(results);
Assert.Equal(pathSegments.Count, results.Count());
List<PathSegmentResponse> resultList = results.ToList();
for (int i = 0; i < pathSegments.Count; i++)
resultList[i].Path.Should().Be(pathSegments[i].Name);
Assert.Equal(pathSegments[i].Name, resultList[i].Path);
}
}
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture;
using AutoFixture.AutoNSubstitute;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Application.Core.FileSystemManagement.Paths.Commands.SplitPath;
using Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -38,8 +37,8 @@ public class SplitPathRequestMappingTests
SplitPathCommand result = request.ToCommand();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(request.Path);
Assert.NotNull(result);
Assert.Equal(request.Path, result.Path);
}
[Theory]
@@ -56,8 +55,8 @@ public class SplitPathRequestMappingTests
SplitPathCommand result = request.ToCommand();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(path);
Assert.NotNull(result);
Assert.Equal(path, result.Path);
}
[Fact]
@@ -70,9 +69,9 @@ public class SplitPathRequestMappingTests
List<SplitPathCommand> results = requests.Select(r => r.ToCommand()).ToList();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(requests.Count);
Assert.NotNull(results);
Assert.Equal(requests.Count, results.Count);
for (int i = 0; i < requests.Count; i++)
results[i].Path.Should().Be(requests[i].Path);
Assert.Equal(requests[i].Path, results[i].Path);
}
}
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using AutoFixture;
using AutoFixture.AutoNSubstitute;
using FluentAssertions;
using Lumina.Application.Common.Mapping.FileSystemManagement.Paths;
using Lumina.Application.Core.FileSystemManagement.Paths.Queries.ValidatePath;
using Lumina.Contracts.Requests.FileSystemManagement.Path;
@@ -38,8 +37,8 @@ public class ValidatePathRequestMappingTests
ValidatePathQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(request.Path);
Assert.NotNull(result);
Assert.Equal(request.Path, result.Path);
}
[Theory]
@@ -58,8 +57,8 @@ public class ValidatePathRequestMappingTests
ValidatePathQuery result = request.ToQuery();
// Assert
result.Should().NotBeNull();
result.Path.Should().Be(path);
Assert.NotNull(result);
Assert.Equal(path, result.Path);
}
[Fact]
@@ -72,9 +71,9 @@ public class ValidatePathRequestMappingTests
List<ValidatePathQuery> results = requests.Select(r => r.ToQuery()).ToList();
// Assert
results.Should().NotBeNull();
results.Should().HaveCount(requests.Count);
Assert.NotNull(results);
Assert.Equal(requests.Count, results.Count);
for (int i = 0; i < requests.Count; i++)
results[i].Path.Should().Be(requests[i].Path);
Assert.Equal(requests[i].Path, results[i].Path);
}
}