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

VIH-10125 upgrade dotnet 8 #1384

Merged
merged 12 commits into from
May 22, 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,704 changes: 0 additions & 2,704 deletions AdminWebsite/AdminWebsite.AcceptanceTests/packages.lock.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<ProjectGuid>F1B76C25-C9A2-4A2E-B946-514C44ECF4CD</ProjectGuid>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -27,19 +25,19 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Faker.NETCore" Version="1.0.2" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.11" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Moq" Version="4.16.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.54.0.64047">
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.25.0.90414">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
5 changes: 5 additions & 0 deletions AdminWebsite/AdminWebsite.IntegrationTests/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Global using directives

global using System;
global using NUnit.Framework;
global using NUnit.Framework.Legacy;
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace Testing.Common
namespace Testing.Common
{
public class ApiUriFactory
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.IdentityModel.Tokens;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Net.Http;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Security.Claims;
using AdminWebsite.Services;
using NUnit.Framework;

namespace AdminWebsite.IntegrationTests.Services
{
Expand All @@ -19,15 +17,15 @@ public class ApplicationLoggerTests
public void Should_trace_without_failure()
{
ApplicationLogger.Trace("Category", "Title", "Information");
Assert.IsTrue(true);
ClassicAssert.IsTrue(true);
}

[Test]
public void Should_trace_without_or_without_properties()
{
ApplicationLogger.TraceWithProperties("Category", "Title", "User", null);
ApplicationLogger.TraceWithProperties("Category", "Title", "User", new Dictionary<string, string>{ {"property", "value"} });
Assert.IsTrue(true);
ClassicAssert.IsTrue(true);
}

[Test]
Expand All @@ -39,13 +37,13 @@ public void Should_trace_without_or_without_object()
Property = "value"
};
ApplicationLogger.TraceWithObject("Category", "Title", "User", someObject);
Assert.IsTrue(true);
ClassicAssert.IsTrue(true);
}

[Test]
public void Should_throw_exception_if_trying_to_trace_null_exception()
{
Assert.Throws<ArgumentNullException>(
ClassicAssert.Throws<ArgumentNullException>(
() => ApplicationLogger.TraceException("Category", "Title", null, null));
}

Expand All @@ -59,7 +57,7 @@ public void Should_trace_exception()
ApplicationLogger.TraceException("Category", "Title", exception, null, null);
ApplicationLogger.TraceException("Category", "Title", exception, null, properties);
ApplicationLogger.TraceException("Category", "Title", exception, null);
Assert.IsTrue(true);
ClassicAssert.IsTrue(true);
}

[Test]
Expand All @@ -68,14 +66,14 @@ public void Should_trace_event()
var properties = new Dictionary<string, string> {{"property", "value"}};
ApplicationLogger.TraceEvent("Title", properties);
ApplicationLogger.TraceEvent("Title", null);
Assert.IsTrue(true);
ClassicAssert.IsTrue(true);
}

[Test]
public void Should_trace_result()
{
ApplicationLogger.TraceRequest("Operation", DateTimeOffset.Now, TimeSpan.FromSeconds(2), "200", true);
Assert.IsTrue(true);
ClassicAssert.IsTrue(true);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using AdminWebsite.Services;
using FluentAssertions;
using Microsoft.Extensions.Caching.Memory;
using NUnit.Framework;

namespace AdminWebsite.IntegrationTests.Services
{
Expand All @@ -32,7 +30,7 @@ public async Task should_return_upcoming_holidays()
{
var result = await _sut.RetrieveUpcomingHolidays();

result.Any(x => x.Date < DateTime.Today).Should().BeFalse();
result.Exists(x => x.Date < DateTime.Today).Should().BeFalse();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using AdminWebsite.Services;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using System.Collections.Generic;
using System.Threading.Tasks;
using BookingsApi.Client;
Expand Down
Loading
Loading