1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

PM-18939 refactoring send service to 'cqrs' (#5652)

* PM-18939 refactoring send service to 'cqrs'

* PM-18939 fixing import issue with sendValidationService

* PM-18939 fixing code based on PR comments

* PM-18339 reverting to previous code in test

* PM-18939 adding XMLdocs to services

* PM-18939 reverting send validation methods

* PM-18939 updating code to match main

* PM-18939 reverting validateUserCanSaveAsync to match main

* PM-18939 fill our param and return sections of XMLdocs

* PM-18939 updating XMLdocs based on PR comments

* Update src/Core/Tools/SendFeatures/Commands/Interfaces/IAnonymousSendCommand.cs

Co-authored-by:  Audrey  <ajensen@bitwarden.com>

* Update src/Core/Tools/SendFeatures/Commands/Interfaces/INonAnonymousSendCommand.cs

Co-authored-by:  Audrey  <ajensen@bitwarden.com>

* Update src/Core/Tools/SendFeatures/Commands/Interfaces/INonAnonymousSendCommand.cs

Co-authored-by:  Audrey  <ajensen@bitwarden.com>

* Update src/Core/Tools/SendFeatures/Services/Interfaces/ISendStorageService.cs

Co-authored-by:  Audrey  <ajensen@bitwarden.com>

* PM-18939 adding commits to change tuple to enum type

* PM-18939 resetting stream position to 0 when uploading file

* PM-18939 updating XMLdocs based on PR comments

* PM-18939 updating XMLdocs

* PM-18939 removing circular dependency

* PM-18939 fixing based on comments

* PM-18939 updating method name and documentation

---------

Co-authored-by:  Audrey  <ajensen@bitwarden.com>
This commit is contained in:
Graham Walker
2025-05-19 22:59:30 -05:00
committed by GitHub
parent 7b3e2a80f4
commit 818934487f
32 changed files with 2295 additions and 1368 deletions

View File

@ -23,11 +23,11 @@ public class SendRotationValidatorTests
public async Task ValidateAsync_Success()
{
// Arrange
var sendService = Substitute.For<ISendService>();
var sendAuthorizationService = Substitute.For<ISendAuthorizationService>();
var sendRepository = Substitute.For<ISendRepository>();
var sut = new SendRotationValidator(
sendService,
sendAuthorizationService,
sendRepository
);
@ -52,11 +52,11 @@ public class SendRotationValidatorTests
public async Task ValidateAsync_SendNotReturnedFromRepository_NotIncludedInOutput()
{
// Arrange
var sendService = Substitute.For<ISendService>();
var sendAuthorizationService = Substitute.For<ISendAuthorizationService>();
var sendRepository = Substitute.For<ISendRepository>();
var sut = new SendRotationValidator(
sendService,
sendAuthorizationService,
sendRepository
);
@ -76,11 +76,11 @@ public class SendRotationValidatorTests
public async Task ValidateAsync_InputMissingUserSend_Throws()
{
// Arrange
var sendService = Substitute.For<ISendService>();
var sendAuthorizationService = Substitute.For<ISendAuthorizationService>();
var sendRepository = Substitute.For<ISendRepository>();
var sut = new SendRotationValidator(
sendService,
sendAuthorizationService,
sendRepository
);