Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODS-6540] Fix TreatErrorsAsWarning typo #1173

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>EdFi.Ods.Api</AssemblyName>
<AssemblyVersion>99.99.99.00</AssemblyVersion>
<RootNamespace>EdFi.Ods.Api</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<PackageProjectUrl>https://github.com/Ed-Fi-Alliance-OSS/Ed-Fi-ODS</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemlbyName>EdFi.Ods.Repositories.NHibernate.Tests</AssemlbyName>
<RootNamespace>EdFi.Ods.Repositories.NHibernate.Tests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>EdFi.Ods.Tests.FakeExtension</AssemblyName>
<RootNamespace>EdFi.Ods.Tests.FakeExtension</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand Down
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
2 changes: 1 addition & 1 deletion Application/EdFi.Ods.Tests/EdFi.Ods.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>EdFi.Ods.Tests</AssemblyName>
<RootNamespace>EdFi.Ods.Tests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
2 changes: 1 addition & 1 deletion Application/Test.Common/Test.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Test.Common</AssemblyName>
<RootNamespace>Test.Common</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Product>EdFi.Admin.DataAccess.IntegrationTests</Product>
<Assembly>EdFi.Admin.DataAccess.IntegrationTests</Assembly>
<RootNameSpace>EdFi.Admin.DataAccess.IntegrationTests</RootNameSpace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>EdFi.Admin.DataAccess.UnitTests</AssemblyName>
<RootNamespace>EdFi.Admin.DataAccess.UnitTests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>EdFi.Ods.Api.IntegrationTests</AssemblyName>
<RootNamespace>EdFi.Ods.Api.IntegrationTests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>EdFi.Ods.WebApi.CompositeSpecFlowTests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>EdFi.Ods.WebApi.IntegrationTests</AssemblyName>
<RootNamespace>EdFi.Ods.WebApi.IntegrationTests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Assembly>EdFi.Security.DataAccess.IntegrationTests</Assembly>
<RootNameSpace>EdFi.Security.DataAccess.IntegrationTests</RootNameSpace>
<Copyright>Copyright © 2024, Ed-Fi Alliance and contributors</Copyright>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>EdFi.Security.DataAccess.UnitTests</AssemblyName>
<RootNamespace>EdFi.Security.DataAccess.UnitTests</RootNamespace>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsTestProject>true</IsTestProject>
Expand Down
2 changes: 1 addition & 1 deletion tests/EdFi.TestFixture/EdFi.TestFixture.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Debug;Release</Configurations>
<TreatErrorsAsWarning>true</TreatErrorsAsWarning>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RestorePackages>true</RestorePackages>
<OutputType>Library</OutputType>
<IsPackable>false</IsPackable>
Expand Down
Loading