mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Inlines fixtures instantiation.
This commit is contained in:
1 parent
b648e2f054
commit
59e16d645a
147 files changed
+190
-898
No files matched your search
+2
-4
@@ -29,8 +29,8 @@ public class GetDirectoriesEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetDirectoriesQuery, Result<IEnumerable<DirectoryResponse>>> _mockHandler;
|
||||
private readonly GetDirectoriesEndpoint _sut;
|
||||
private readonly GetDirectoriesRequestFixture _getDirectoriesRequestFixture;
|
||||
private readonly DirectoryResponseFixture _directoryResponseFixture;
|
||||
private readonly GetDirectoriesRequestFixture _getDirectoriesRequestFixture = new();
|
||||
private readonly DirectoryResponseFixture _directoryResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetDirectoriesEndpointTests"/> class.
|
||||
@@ -38,8 +38,6 @@ public class GetDirectoriesEndpointTests
|
||||
public GetDirectoriesEndpointTests()
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetDirectoriesQuery, Result<IEnumerable<DirectoryResponse>>>>();
|
||||
_getDirectoriesRequestFixture = new GetDirectoriesRequestFixture();
|
||||
_directoryResponseFixture = new DirectoryResponseFixture();
|
||||
_sut = Factory.Create<GetDirectoriesEndpoint>(_mockHandler);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -27,7 +27,7 @@ public class GetDrivesEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetDrivesQuery, Result<IEnumerable<FileSystemTreeNodeResponse>>> _mockHandler;
|
||||
private readonly GetDrivesEndpoint _sut;
|
||||
private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
|
||||
private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DrivesControllerTests"/> class.
|
||||
@@ -35,7 +35,6 @@ public class GetDrivesEndpointTests
|
||||
public GetDrivesEndpointTests()
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetDrivesQuery, Result<IEnumerable<FileSystemTreeNodeResponse>>>>();
|
||||
_fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture();
|
||||
_sut = Factory.Create<GetDrivesEndpoint>(_mockHandler);
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -29,8 +29,8 @@ public class GetFilesEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetFilesQuery, Result<IEnumerable<FileResponse>>> _mockHandler;
|
||||
private readonly GetFilesEndpoint _sut;
|
||||
private readonly GetFilesRequestFixture _getFilesRequestFixture;
|
||||
private readonly FileResponseFixture _fileResponseFixture;
|
||||
private readonly GetFilesRequestFixture _getFilesRequestFixture = new();
|
||||
private readonly FileResponseFixture _fileResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetFilesEndpointTests"/> class.
|
||||
@@ -38,8 +38,6 @@ public class GetFilesEndpointTests
|
||||
public GetFilesEndpointTests()
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetFilesQuery, Result<IEnumerable<FileResponse>>>>();
|
||||
_getFilesRequestFixture = new GetFilesRequestFixture();
|
||||
_fileResponseFixture = new FileResponseFixture();
|
||||
_sut = Factory.Create<GetFilesEndpoint>(_mockHandler);
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -29,8 +29,8 @@ public class GetTreeFilesEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetTreeFilesQuery, Result<IEnumerable<FileSystemTreeNodeResponse>>> _mockHandler;
|
||||
private readonly GetTreeFilesEndpoint _sut;
|
||||
private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
|
||||
private readonly GetTreeFilesRequestFixture _getTreeFilesRequestFixture;
|
||||
private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture = new();
|
||||
private readonly GetTreeFilesRequestFixture _getTreeFilesRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetTreeFilesEndpointTests"/> class.
|
||||
@@ -38,8 +38,6 @@ public class GetTreeFilesEndpointTests
|
||||
public GetTreeFilesEndpointTests()
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetTreeFilesQuery, Result<IEnumerable<FileSystemTreeNodeResponse>>>>();
|
||||
_fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture();
|
||||
_getTreeFilesRequestFixture = new GetTreeFilesRequestFixture();
|
||||
_sut = Factory.Create<GetTreeFilesEndpoint>(_mockHandler);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -26,7 +26,7 @@ public class CheckPathExistsEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<CheckPathExistsQuery, Result<PathExistsResponse>> _mockHandler;
|
||||
private readonly CheckPathExistsEndpoint _sut;
|
||||
private readonly CheckPathExistsRequestFixture _checkPathExistsRequestFixture;
|
||||
private readonly CheckPathExistsRequestFixture _checkPathExistsRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CheckPathExistsEndpointTests"/> class.
|
||||
@@ -35,7 +35,6 @@ public class CheckPathExistsEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<CheckPathExistsQuery, Result<PathExistsResponse>>>();
|
||||
_sut = Factory.Create<CheckPathExistsEndpoint>(_mockHandler);
|
||||
_checkPathExistsRequestFixture = new CheckPathExistsRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+2
-4
@@ -26,8 +26,8 @@ public class CombinePathEndpointTests
|
||||
{
|
||||
private readonly ICommandHandler<CombinePathCommand, Result<PathSegmentResponse>> _mockHandler;
|
||||
private readonly CombinePathEndpoint _sut;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
private readonly CombinePathRequestFixture _combinePathRequestFixture;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
|
||||
private readonly CombinePathRequestFixture _combinePathRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CombinePathEndpointTests"/> class.
|
||||
@@ -36,8 +36,6 @@ public class CombinePathEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<ICommandHandler<CombinePathCommand, Result<PathSegmentResponse>>>();
|
||||
_sut = FastEndpoints.Factory.Create<CombinePathEndpoint>(_mockHandler);
|
||||
_pathSegmentResponseFixture = new PathSegmentResponseFixture();
|
||||
_combinePathRequestFixture = new CombinePathRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+2
-4
@@ -29,8 +29,8 @@ public class GetPathParentEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetPathParentQuery, Result<IEnumerable<PathSegmentResponse>>> _mockHandler;
|
||||
private readonly GetPathParentEndpoint _sut;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
private readonly GetPathParentRequestFixture _getPathParentRequestFixture;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
|
||||
private readonly GetPathParentRequestFixture _getPathParentRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathParentEndpointTests"/> class.
|
||||
@@ -39,8 +39,6 @@ public class GetPathParentEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetPathParentQuery, Result<IEnumerable<PathSegmentResponse>>>>();
|
||||
_sut = Factory.Create<GetPathParentEndpoint>(_mockHandler);
|
||||
_pathSegmentResponseFixture = new PathSegmentResponseFixture();
|
||||
_getPathParentRequestFixture = new GetPathParentRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+2
-4
@@ -27,8 +27,8 @@ public class GetPathRootEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetPathRootQuery, Result<PathSegmentResponse>> _mockHandler;
|
||||
private readonly GetPathRootEndpoint _sut;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
private readonly GetPathRootRequestFixture _getPathRootRequestFixture;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
|
||||
private readonly GetPathRootRequestFixture _getPathRootRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathRootEndpointTests"/> class.
|
||||
@@ -37,8 +37,6 @@ public class GetPathRootEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetPathRootQuery, Result<PathSegmentResponse>>>();
|
||||
_sut = Factory.Create<GetPathRootEndpoint>(_mockHandler);
|
||||
_pathSegmentResponseFixture = new PathSegmentResponseFixture();
|
||||
_getPathRootRequestFixture = new GetPathRootRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -24,7 +24,7 @@ public class GetPathSeparatorEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetPathSeparatorQuery, PathSeparatorResponse> _mockHandler;
|
||||
private readonly GetPathSeparatorEndpoint _sut;
|
||||
private readonly PathSeparatorResponseFixture _pathSeparatorResponseFixture;
|
||||
private readonly PathSeparatorResponseFixture _pathSeparatorResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathSeparatorEndpointTests"/> class.
|
||||
@@ -33,7 +33,6 @@ public class GetPathSeparatorEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetPathSeparatorQuery, PathSeparatorResponse>>();
|
||||
_sut = Factory.Create<GetPathSeparatorEndpoint>(_mockHandler);
|
||||
_pathSeparatorResponseFixture = new PathSeparatorResponseFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+2
-4
@@ -28,8 +28,8 @@ public class SplitPathEndpointTests
|
||||
{
|
||||
private readonly ICommandHandler<SplitPathCommand, Result<IEnumerable<PathSegmentResponse>>> _mockHandler;
|
||||
private readonly SplitPathEndpoint _sut;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
private readonly SplitPathRequestFixture _splitPathRequestFixture;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture = new();
|
||||
private readonly SplitPathRequestFixture _splitPathRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SplitPathEndpointTests"/> class.
|
||||
@@ -38,8 +38,6 @@ public class SplitPathEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<ICommandHandler<SplitPathCommand, Result<IEnumerable<PathSegmentResponse>>>>();
|
||||
_sut = FastEndpoints.Factory.Create<SplitPathEndpoint>(_mockHandler);
|
||||
_pathSegmentResponseFixture = new PathSegmentResponseFixture();
|
||||
_splitPathRequestFixture = new SplitPathRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -26,7 +26,7 @@ public class ValidatePathEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<ValidatePathQuery, Result<PathValidResponse>> _mockHandler;
|
||||
private readonly ValidatePathEndpoint _sut;
|
||||
private readonly ValidatePathRequestFixture _validatePathRequestFixture;
|
||||
private readonly ValidatePathRequestFixture _validatePathRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ValidatePathEndpointTests"/> class.
|
||||
@@ -35,7 +35,6 @@ public class ValidatePathEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<ValidatePathQuery, Result<PathValidResponse>>>();
|
||||
_sut = Factory.Create<ValidatePathEndpoint>(_mockHandler);
|
||||
_validatePathRequestFixture = new ValidatePathRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+2
-4
@@ -28,8 +28,8 @@ public class GetThumbnailEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetThumbnailQuery, Result<ThumbnailResponse>> _mockHandler;
|
||||
private readonly GetThumbnailEndpoint _sut;
|
||||
private readonly GetThumbnailRequestFixture _getThumbnailRequestFixture;
|
||||
private readonly ThumbnailResponseFixture _thumbnailResponseFixture;
|
||||
private readonly GetThumbnailRequestFixture _getThumbnailRequestFixture = new();
|
||||
private readonly ThumbnailResponseFixture _thumbnailResponseFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetThumbnailEndpointTests"/> class.
|
||||
@@ -38,8 +38,6 @@ public class GetThumbnailEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetThumbnailQuery, Result<ThumbnailResponse>>>();
|
||||
_sut = Factory.Create<GetThumbnailEndpoint>(_mockHandler);
|
||||
_getThumbnailRequestFixture = new GetThumbnailRequestFixture();
|
||||
_thumbnailResponseFixture = new ThumbnailResponseFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -25,7 +25,7 @@ public class SetupApplicationEndpointTests
|
||||
{
|
||||
private readonly ICommandHandler<SetupApplicationCommand, Result<RegistrationResponse>> _mockHandler;
|
||||
private readonly SetupApplicationEndpoint _sut;
|
||||
private readonly RegistrationRequestFixture _registrationRequestFixture;
|
||||
private readonly RegistrationRequestFixture _registrationRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SetupApplicationEndpointTests"/> class.
|
||||
@@ -34,7 +34,6 @@ public class SetupApplicationEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<ICommandHandler<SetupApplicationCommand, Result<RegistrationResponse>>>();
|
||||
_sut = FastEndpoints.Factory.Create<SetupApplicationEndpoint>(_mockHandler);
|
||||
_registrationRequestFixture = new RegistrationRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -25,7 +25,7 @@ public class ChangePasswordEndpointTests
|
||||
{
|
||||
private readonly ICommandHandler<ChangePasswordCommand, Result<ChangePasswordResponse>> _mockHandler;
|
||||
private readonly ChangePasswordEndpoint _sut;
|
||||
private readonly ChangePasswordRequestFixture _changePasswordRequestFixture;
|
||||
private readonly ChangePasswordRequestFixture _changePasswordRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChangePasswordEndpointTests"/> class.
|
||||
@@ -34,7 +34,6 @@ public class ChangePasswordEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<ICommandHandler<ChangePasswordCommand, Result<ChangePasswordResponse>>>();
|
||||
_sut = FastEndpoints.Factory.Create<ChangePasswordEndpoint>(_mockHandler);
|
||||
_changePasswordRequestFixture = new ChangePasswordRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -26,7 +26,7 @@ public class LoginEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<LoginUserQuery, Result<LoginResponse>> _mockHandler;
|
||||
private readonly LoginEndpoint _sut;
|
||||
private readonly LoginRequestFixture _loginRequestFixture;
|
||||
private readonly LoginRequestFixture _loginRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LoginEndpointTests"/> class.
|
||||
@@ -35,7 +35,6 @@ public class LoginEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<LoginUserQuery, Result<LoginResponse>>>();
|
||||
_sut = Factory.Create<LoginEndpoint>(_mockHandler);
|
||||
_loginRequestFixture = new LoginRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -25,7 +25,7 @@ public class RecoverPasswordEndpointTests
|
||||
{
|
||||
private readonly ICommandHandler<RecoverPasswordCommand, Result<RecoverPasswordResponse>> _mockHandler;
|
||||
private readonly RecoverPasswordEndpoint _sut;
|
||||
private readonly RecoverPasswordRequestFixture _recoverPasswordRequestFixture;
|
||||
private readonly RecoverPasswordRequestFixture _recoverPasswordRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RecoverPasswordEndpointTests"/> class.
|
||||
@@ -34,7 +34,6 @@ public class RecoverPasswordEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<ICommandHandler<RecoverPasswordCommand, Result<RecoverPasswordResponse>>>();
|
||||
_sut = FastEndpoints.Factory.Create<RecoverPasswordEndpoint>(_mockHandler);
|
||||
_recoverPasswordRequestFixture = new RecoverPasswordRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -25,7 +25,7 @@ public class RegisterEndpointTests
|
||||
{
|
||||
private readonly ICommandHandler<RegisterUserCommand, Result<RegistrationResponse>> _mockHandler;
|
||||
private readonly RegisterEndpoint _sut;
|
||||
private readonly RegistrationRequestFixture _registrationRequestFixture;
|
||||
private readonly RegistrationRequestFixture _registrationRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RegisterEndpointTests"/> class.
|
||||
@@ -34,7 +34,6 @@ public class RegisterEndpointTests
|
||||
{
|
||||
_mockHandler = Substitute.For<ICommandHandler<RegisterUserCommand, Result<RegistrationResponse>>>();
|
||||
_sut = FastEndpoints.Factory.Create<RegisterEndpoint>(_mockHandler);
|
||||
_registrationRequestFixture = new RegistrationRequestFixture();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -29,7 +29,7 @@ public class GetAuthorizationEndpointTests
|
||||
{
|
||||
private readonly IQueryHandler<GetAuthorizationQuery, Result<AuthorizationResponse>> _mockHandler;
|
||||
private readonly GetAuthorizationEndpoint _sut;
|
||||
private readonly GetAuthorizationRequestFixture _getAuthorizationRequestFixture;
|
||||
private readonly GetAuthorizationRequestFixture _getAuthorizationRequestFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetAuthorizationEndpointTests"/> class.
|
||||
@@ -37,7 +37,6 @@ public class GetAuthorizationEndpointTests
|
||||
public GetAuthorizationEndpointTests()
|
||||
{
|
||||
_mockHandler = Substitute.For<IQueryHandler<GetAuthorizationQuery, Result<AuthorizationResponse>>>();
|
||||
_getAuthorizationRequestFixture = new GetAuthorizationRequestFixture();
|
||||
_sut = Factory.Create<GetAuthorizationEndpoint>(_mockHandler);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user