Skip to content
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ARG MCR_REGISTRY=mcr.microsoft.com

FROM ${MCR_REGISTRY}/dotnet/sdk:8.0 AS build
FROM ${MCR_REGISTRY}/dotnet/sdk:10.0 AS build
WORKDIR /app
COPY src ./

Expand All @@ -16,7 +16,7 @@ RUN groupadd --gid "${GROUP_ID}" "${USERNAME}" && \
RUN dotnet publish -o publish -c Debug
#RUN dotnet publish "Dataport.Terminfinder.WebAPI/Dataport.Terminfinder.WebAPI.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM ${MCR_REGISTRY}/dotnet/aspnet:8.0
FROM ${MCR_REGISTRY}/dotnet/aspnet:10.0
WORKDIR /app
#EXPOSE 80

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Copyright © 2022-2024 Dataport AöR
* PostgreSql Database

## Requirements
* Microsoft dotnet 8, [ASP.NET Core Runtime 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
* Microsoft dotnet 10, [ASP.NET Core Runtime 10.0](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
* Database [PostgreSQL](https://www.postgresql.org/)

## Database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Dataport.Terminfinder.Repository;
using JetBrains.Annotations;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;

namespace Dataport.Terminfinder.BusinessLayer.Tests;
Expand Down Expand Up @@ -689,7 +688,7 @@ public void VerifyAppointmentPassword_NotProtected_ThrowsException()

var sut = CreateSut(mockAppointmentRepo.Object);

var exception = Assert.ThrowsException<InvalidOperationException>(() =>
var exception = Assert.ThrowsExactly<InvalidOperationException>(() =>
sut.VerifyAppointmentPassword(ExpectedCustomerId, ExpectedAppointmentId, ExpectedPassword));
Assert.AreEqual(expectedExceptionMessage, exception.Message);
}
Expand Down Expand Up @@ -727,7 +726,7 @@ public void VerifyAppointmentPasswordByAdminId_NotProtected_ThrowsException()

var sut = CreateSut(mockAppointmentRepo.Object);

var exception = Assert.ThrowsException<InvalidOperationException>(() =>
var exception = Assert.ThrowsExactly<InvalidOperationException>(() =>
sut.VerifyAppointmentPasswordByAdminId(ExpectedCustomerId, ExpectedAdminId, ExpectedPassword));
Assert.AreEqual(expectedExceptionMessage, exception.Message);
}
Expand Down Expand Up @@ -1024,8 +1023,7 @@ public void SetAppointmentStatusType_ChangeStatusType_DeletedToStarted_Exception
var sut = CreateSut(mockAppointmentRepo.Object, mockCustomerRepo.Object, mockBcryptWrapper.Object);

var appointmentObject = sut.SetAppointmentStatusType(ExpectedCustomerId, ExpectedAdminId, newStatusType);
Assert.IsTrue(appointmentObject == null);
Assert.IsFalse(appointmentObject != null);
Assert.IsNull(appointmentObject);
}

[TestMethod]
Expand All @@ -1039,7 +1037,7 @@ public void SetAppointmentStatusType_NotProtected_ThrowsException()

var sut = CreateSut(mockAppointmentRepo.Object);

var exception = Assert.ThrowsException<InvalidOperationException>(() =>
var exception = Assert.ThrowsExactly<InvalidOperationException>(() =>
sut.SetAppointmentStatusType(ExpectedCustomerId, ExpectedAdminId, AppointmentStatusType.Undefined));
Assert.AreEqual(expectedExceptionMessage, exception.Message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Dataport.Terminfinder.Repository;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;

namespace Dataport.Terminfinder.BusinessLayer.Tests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<DebugType>Portable</DebugType>
<ProjectGuid>{8E57A52E-327B-45F6-A19E-97FF379586D5}</ProjectGuid>
<LangVersion>12</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -18,19 +18,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="4.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.3.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Dataport.Terminfinder.BusinessLayer.Security;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;

namespace Dataport.Terminfinder.BusinessLayer.Tests.Security;
Expand All @@ -26,7 +25,7 @@ public void Initialize()
public void HashPassword_null_throwException()
{
var sut = CreateSut(saltGenerator);
Assert.ThrowsException<ArgumentNullException>(() => sut.HashPassword(null));
Assert.ThrowsExactly<ArgumentNullException>(() => sut.HashPassword(null));
}

[TestMethod]
Expand All @@ -42,14 +41,14 @@ public void HashPassword_anyPassword_createdBcryptHash()
public void HashPassword_passwordIsNullHashIsNotNull_throwException()
{
var sut = CreateSut(saltGenerator);
Assert.ThrowsException<ArgumentNullException>(() => sut.Verify(null, string.Empty));
Assert.ThrowsExactly<ArgumentNullException>(() => sut.Verify(null, string.Empty));
}

[TestMethod]
public void HashPassword_passwordIsNotNullPasswordIsNull_throwException()
{
var sut = CreateSut(saltGenerator);
Assert.ThrowsException<ArgumentNullException>(() => sut.Verify(string.Empty, null));
Assert.ThrowsExactly<ArgumentNullException>(() => sut.Verify(string.Empty, null));
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Dataport.Terminfinder.BusinessLayer.Security;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;

namespace Dataport.Terminfinder.BusinessLayer.Tests.Security;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Dataport.Terminfinder.Repository;
using Dataport.Terminfinder.BusinessObject;
using Dataport.Terminfinder.BusinessObject;
using Dataport.Terminfinder.Repository;

namespace Dataport.Terminfinder.BusinessLayer;

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

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Dataport.Terminfinder.BusinessLayer</RootNamespace>
<AssemblyName>Dataport.Terminfinder.BusinessLayer</AssemblyName>
<DebugType>Portable</DebugType>
<ProjectGuid>{B8152437-534A-4732-81C0-AEEF53A79D69}</ProjectGuid>
<LangVersion>12</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -24,11 +24,11 @@

<ItemGroup>
<PackageReference Include="BCrypt.Net-Core" Version="1.6.0" />
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.8" />
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<DebugType>Portable</DebugType>
<ProjectGuid>{D8A42831-89E7-4D75-B9A6-9C949A84C46D}</ProjectGuid>
<LangVersion>12</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -18,18 +18,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.3.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void ReadJson_NonValidDateValueAsString_deserializedDateValue_false()
var dt = "99.99.2015";
var sut = new DateConverter();

Assert.ThrowsException<FormatException>(() =>
Assert.ThrowsExactly<FormatException>(() =>
{
using var sr = new StringReader($"\"{dt}\"");
using var jsonReader = new JsonTextReader(sr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public IEnumerable<ValidationResult> Validate(ValidationContext validationContex
[TestMethod]
public void Constructor_MaxElementsValueIsTooGreat_throwException()
{
Assert.ThrowsException<ArgumentException>(() => new EnsureMaximumElementsAttribute()
Assert.ThrowsExactly<ArgumentException>(() => new EnsureMaximumElementsAttribute()
{
ErrorMessage = ExectedEnsureMaximumElementsAttributeErrorMessage,
MaxElements = 10001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public IEnumerable<ValidationResult> Validate(ValidationContext validationContex
[TestMethod]
public void Constructor_MinElementsValueIsTooSmall_throwException()
{
Assert.ThrowsException<ArgumentException>(() => new EnsureMinimumElementsAttribute
Assert.ThrowsExactly<ArgumentException>(() => new EnsureMinimumElementsAttribute
{
ErrorMessage = ExectedEnsureMinimumElementsAttributeErrorMessage,
MinElements = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,6 @@ public void IsValid_InvalidPasswordNoSpecialCharacter_false()
[TestMethod]
public void IsValid_null_throwException()
{
Assert.ThrowsException<ArgumentNullException>(() => PasswordValidator.IsValid(null));
Assert.ThrowsExactly<ArgumentNullException>(() => PasswordValidator.IsValid(null));
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Dataport.Terminfinder.BusinessObject</RootNamespace>
<AssemblyName>Dataport.Terminfinder.BusinessObject</AssemblyName>
<DebugType>Portable</DebugType>
<ProjectGuid>{EF3E18F3-A3ED-48F2-B006-2D24FB2C7C14}</ProjectGuid>
<LangVersion>12</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<DebugType>Portable</DebugType>
<ProjectGuid>{D5D97A5B-B33E-4ED9-BF4E-549C3A265978}</ProjectGuid>
<LangVersion>12</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -18,17 +18,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="10.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.3.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Dataport.Terminfinder.Common.Extension;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections;

namespace Dataport.Terminfinder.Common.Tests.Extension;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Dataport.Terminfinder.Common.Extension;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Dataport.Terminfinder.Common.Tests.Extension;

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

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Dataport.Terminfinder.Common</RootNamespace>
<AssemblyName>Dataport.Terminfinder.Common</AssemblyName>
<DebugType>Portable</DebugType>
<ProjectGuid>{5CF17597-DF2A-4FD2-A725-33E7E41B0A86}</ProjectGuid>
<LangVersion>12</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageReference Include="JetBrains.Annotations" Version="2026.2.0" />
</ItemGroup>

</Project>
Loading