Skip to content

Commit

Permalink
Fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
simpat-jesus committed Oct 28, 2024
1 parent 3bba90e commit e942e9e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class IdentificationCodeAggregateRootQueryCriteriaApplicatorTests
{
private IResourceModel _resourceModel;
private IResourceModelProvider _resourceModelProvider;
private IResourceIdentificationCodePropertiesProvider _resourceIdentificationCodePropertiesProvider;
private readonly string identificationCodeTableAlias =
IdentificationCodeAggregateRootQueryCriteriaApplicator.IdentificationCodeEntityTableAlias();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ public void Should_be_a_valid_swagger_document_for_each_extension_schema_in_the_
public class When_requesting_a_section_from_the_cache_for_which_no_route_was_registered : TestFixtureBase
{
private OpenApiMetadataCacheProvider _openApiMetadataCacheProvider;
private IResourceIdentificationCodePropertiesProvider _resourceIdentificationCodePropertiesProvider;
private List<OpenApiContent> _actualMetadata;

protected override void Arrange()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public async Task AuthorizeEntityAsync_ShouldCallValidateOnAuthorizationValidato
}

[Test]
public async Task AuthorizeEntityAsync_ShouldThrowException_WhenDelegateFilterAuthorizerFailsAndResults()
public Task AuthorizeEntityAsync_ShouldThrowException_WhenDelegateFilterAuthorizerFailsAndResults()
{
// Arrange
var actionUri = "some-action-uri";
Expand Down Expand Up @@ -150,6 +150,8 @@ public async Task AuthorizeEntityAsync_ShouldThrowException_WhenDelegateFilterAu
_entityAuthorizer.AuthorizeEntityAsync(entity, actionUri, AuthorizationPhase.ExistingData, CancellationToken.None));

ex.Message.ShouldBe("Authorization failed");

return Task.CompletedTask;
}

[Test]
Expand Down Expand Up @@ -295,7 +297,7 @@ public async Task AuthorizeEntityAsync_ShouldPerformViewBasedAuthorization_WhenP
}

[Test]
public async Task AuthorizeEntityAsync_ShouldThrow_WhenAllPendingExistenceChecksIsEmpty()
public Task AuthorizeEntityAsync_ShouldThrow_WhenAllPendingExistenceChecksIsEmpty()
{
// Arrange
var actionUri = "some-action-uri";
Expand Down Expand Up @@ -332,10 +334,12 @@ public async Task AuthorizeEntityAsync_ShouldThrow_WhenAllPendingExistenceChecks
_entityAuthorizer.AuthorizeEntityAsync(entity, actionUri, AuthorizationPhase.ExistingData, CancellationToken.None));

ex.Message.ShouldBe("Authorization failed");

return Task.CompletedTask;
}

[Test]
public async Task AuthorizeEntityAsync_ShouldThrow_WhenPendingOrStrategyResultsInFailedState()
public Task AuthorizeEntityAsync_ShouldThrow_WhenPendingOrStrategyResultsInFailedState()
{
// Arrange
var actionUri = "some-action-uri";
Expand Down Expand Up @@ -383,5 +387,7 @@ public async Task AuthorizeEntityAsync_ShouldThrow_WhenPendingOrStrategyResultsI
_entityAuthorizer.AuthorizeEntityAsync(entity, actionUri, AuthorizationPhase.ExistingData, CancellationToken.None));

ex.Message.ShouldBe("Authorization failed");

return Task.CompletedTask;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void SetUp()
private EntityInstanceViewBasedFilterAuthorizer _authorizer;

[Test]
public async Task PerformViewBasedAuthorizationAsync_ShouldNotExecuteQuery_WhenParameterValuesAreNull()
public Task PerformViewBasedAuthorizationAsync_ShouldNotExecuteQuery_WhenParameterValuesAreNull()
{
// Arrange
var resultsWithPendingExistenceChecks = new[]
Expand Down Expand Up @@ -83,6 +83,8 @@ public async Task PerformViewBasedAuthorizationAsync_ShouldNotExecuteQuery_WhenP
resultsWithPendingExistenceChecks,
claimEducationOrganizationIds))
.MustNotHaveHappened();

return Task.CompletedTask;
}

[Test]
Expand Down

0 comments on commit e942e9e

Please sign in to comment.