diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 95c8f5e..d75aef4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -2,30 +2,28 @@ name: .NET Core Desktop on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] jobs: - build: - - runs-on: windows-latest # For a list of available runner types, refer to - # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on + runs-on: windows-latest steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Install .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x + - name: Install .NET 9 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + # cache: true - - name: Execute unit tests - run: | - cd sourcecodes - dotnet build --configuration Release - dotnet test ./FolderSecurityViewer.sln --framework net8.0-windows --configuration Release + - name: Execute unit tests + run: | + cd sourcecodes + dotnet build --configuration Release + dotnet test ./FolderSecurityViewer.sln --framework net9.0-windows --configuration Release diff --git a/CHANGELOG.md b/CHANGELOG.md index 89a0e8f..a7797f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.9.0-beta.1] - 2025-11-13 + +This release upgrades the entire solution to .NET 9.0, bringing performance improvements and access to the latest framework features. All dependencies have been updated. + +### Changed + +- Changed the target framework to .NET 9.0 across all projects [#12](https://github.com/carstenschaefer/FolderSecurityViewer/pull/12) +- Updated GitHub Actions workflow to use .NET 9.0 [#12](https://github.com/carstenschaefer/FolderSecurityViewer/pull/12) +- Updated all NuGet packages in the whole solution [#12](https://github.com/carstenschaefer/FolderSecurityViewer/pull/12) +- Updated test framework target from net8.0-windows to net9.0-windows [#12](https://github.com/carstenschaefer/FolderSecurityViewer/pull/12) +- Migrated unit tests from xUnit to MSTest framework with improved assertions [#12](https://github.com/carstenschaefer/FolderSecurityViewer/pull/12) + ## [v2.8.1-beta.1] - 2024-08-24 ### Changed diff --git a/README.md b/README.md index a2ed9cc..531c204 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,16 @@ If you want to automate your NTFS permissions reporting, you can use the Command The application can be compiled on Windows, and depends on the following Frameworks and utilities: -* .NET Framework 8.0 SDK -* Optional: Visual Studio 2022 -* MSBuild version 17.9.8 or above +* .NET Framework 9.0 SDK +* Optional: Visual Studio 2026 ### Platform compatibility -Ensure your target platform is supported by .NET 8; check the supported OS versions in the [.NET 8 Release Notes](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#net-8---supported-os-versions). If you need a build compatible with Windows 7 or 8, please refer to version [v2.7.0-beta.1](https://github.com/carstenschaefer/FolderSecurityViewer/releases/tag/v2.7.0-beta.1), which depends on .NET Framework 4.7 and Visual Studio. +Ensure your target platform is supported by .NET 9; check the supported OS versions in the [.NET 9 Release Notes](https://github.com/dotnet/core/blob/main/release-notes/9.0/supported-os.md). + +* If you need a built targeting .NET 8, please refer to version [v2.8.1-beta.1](https://github.com/carstenschaefer/FolderSecurityViewer/releases/tag/v2.8.1-beta.1). + +* If you need a build compatible with Windows 7 or 8, please refer to version [v2.7.0-beta.1](https://github.com/carstenschaefer/FolderSecurityViewer/releases/tag/v2.7.0-beta.1), which depends on .NET Framework 4.7 and Visual Studio. ### Build @@ -73,8 +76,8 @@ $ dotnet build ./FolderSecurityViewer.sln --configuration Release ````bash $ dotnet clean && dotnet build -$ dotnet test --framework net8.0-windows +$ dotnet test --framework net9.0-windows ```` -Copyright (C) 2015 - 2024 by Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +Copyright (C) 2015 - 2025 by Carsten Schäfer, Matthias Friedrich, and Ritesh Gite diff --git a/sourcecodes/FSV.ActiveDirectoryServices.TestAbstractionLayer/FSV.ActiveDirectoryServices.TestAbstractionLayer.csproj b/sourcecodes/FSV.ActiveDirectoryServices.TestAbstractionLayer/FSV.ActiveDirectoryServices.TestAbstractionLayer.csproj index f42dcb3..cf97351 100644 --- a/sourcecodes/FSV.ActiveDirectoryServices.TestAbstractionLayer/FSV.ActiveDirectoryServices.TestAbstractionLayer.csproj +++ b/sourcecodes/FSV.ActiveDirectoryServices.TestAbstractionLayer/FSV.ActiveDirectoryServices.TestAbstractionLayer.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library latest false @@ -8,7 +8,7 @@ FSV.ActiveDirectoryServices.TestAbstractionLayer FSV.ActiveDirectoryServices.TestAbstractionLayer - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 1.0.0.0 @@ -17,7 +17,7 @@ - 16.0.0 + 16.3.0 \ No newline at end of file diff --git a/sourcecodes/FSV.AdServices.Abstractions/FSV.AdServices.Abstractions.csproj b/sourcecodes/FSV.AdServices.Abstractions/FSV.AdServices.Abstractions.csproj index 29e9a63..fdf1cdc 100644 --- a/sourcecodes/FSV.AdServices.Abstractions/FSV.AdServices.Abstractions.csproj +++ b/sourcecodes/FSV.AdServices.Abstractions/FSV.AdServices.Abstractions.csproj @@ -1,17 +1,17 @@  - net8.0 + net9.0 Library false true FSV.AdServices.Abstractions - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer diff --git a/sourcecodes/FSV.AdServices.UnitTest/ActiveDirectoryLdapUtilityTest.cs b/sourcecodes/FSV.AdServices.UnitTest/ActiveDirectoryLdapUtilityTest.cs index 08abd7a..a5c1e15 100644 --- a/sourcecodes/FSV.AdServices.UnitTest/ActiveDirectoryLdapUtilityTest.cs +++ b/sourcecodes/FSV.AdServices.UnitTest/ActiveDirectoryLdapUtilityTest.cs @@ -1,4 +1,4 @@ -// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. +// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. // Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify @@ -32,8 +32,8 @@ public void ActiveDirectoryLdapUtility_GetDnElementListFromLdapPath_Test() // Assert Assert.IsNotNull(actual); - Assert.AreEqual(3, actual.Length); - Assert.AreEqual(actual[0], "DN=Users"); + Assert.HasCount(3, actual); + Assert.AreEqual("DN=Users", actual[0]); } } } \ No newline at end of file diff --git a/sourcecodes/FSV.AdServices.UnitTest/FSV.AdServices.UnitTest.csproj b/sourcecodes/FSV.AdServices.UnitTest/FSV.AdServices.UnitTest.csproj index 3d8b2d1..806a41c 100644 --- a/sourcecodes/FSV.AdServices.UnitTest/FSV.AdServices.UnitTest.csproj +++ b/sourcecodes/FSV.AdServices.UnitTest/FSV.AdServices.UnitTest.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows latest false false @@ -10,21 +10,21 @@ none FSV.AdServices.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 FSV.AdServices.UnitTest - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + diff --git a/sourcecodes/FSV.AdServices/FSV.AdServices.csproj b/sourcecodes/FSV.AdServices/FSV.AdServices.csproj index d08f765..241da2d 100644 --- a/sourcecodes/FSV.AdServices/FSV.AdServices.csproj +++ b/sourcecodes/FSV.AdServices/FSV.AdServices.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library false @@ -14,11 +14,11 @@ none FSV.AdServices - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -33,11 +33,11 @@ - 2024.2.0 + 2025.2.2 - - - + + + \ No newline at end of file diff --git a/sourcecodes/FSV.Business.UnitTest/FSV.Business.UnitTest.csproj b/sourcecodes/FSV.Business.UnitTest/FSV.Business.UnitTest.csproj index 4740f37..2d05084 100644 --- a/sourcecodes/FSV.Business.UnitTest/FSV.Business.UnitTest.csproj +++ b/sourcecodes/FSV.Business.UnitTest/FSV.Business.UnitTest.csproj @@ -3,7 +3,7 @@ none FSV.Business.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 false false @@ -11,13 +11,16 @@ latest Library FSV.Business.UnitTest - net8.0-windows + net9.0-windows - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/sourcecodes/FSV.Business/FSV.Business.csproj b/sourcecodes/FSV.Business/FSV.Business.csproj index 660f610..13aafe5 100644 --- a/sourcecodes/FSV.Business/FSV.Business.csproj +++ b/sourcecodes/FSV.Business/FSV.Business.csproj @@ -1,6 +1,6 @@ - net8.0-windows + net9.0-windows Library ..\ true @@ -9,11 +9,11 @@ FSV.Business - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -55,7 +55,7 @@ - - + + \ No newline at end of file diff --git a/sourcecodes/FSV.Configuration.Abstractions/FSV.Configuration.Abstractions.csproj b/sourcecodes/FSV.Configuration.Abstractions/FSV.Configuration.Abstractions.csproj index 2cb3eb7..fbb6b73 100644 --- a/sourcecodes/FSV.Configuration.Abstractions/FSV.Configuration.Abstractions.csproj +++ b/sourcecodes/FSV.Configuration.Abstractions/FSV.Configuration.Abstractions.csproj @@ -1,13 +1,13 @@ - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer - net8.0 + net9.0 2.4.1 \ No newline at end of file diff --git a/sourcecodes/FSV.Configuration.UnitTest/ConfigurationManagerTest.cs b/sourcecodes/FSV.Configuration.UnitTest/ConfigurationManagerTest.cs index 4117c73..3397120 100644 --- a/sourcecodes/FSV.Configuration.UnitTest/ConfigurationManagerTest.cs +++ b/sourcecodes/FSV.Configuration.UnitTest/ConfigurationManagerTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -55,7 +55,7 @@ void Act() } // Assert - Assert.ThrowsException(Act); + Assert.Throws(Act); } } } \ No newline at end of file diff --git a/sourcecodes/FSV.Configuration.UnitTest/FSV.Configuration.UnitTest.csproj b/sourcecodes/FSV.Configuration.UnitTest/FSV.Configuration.UnitTest.csproj index 3ec2999..911287e 100644 --- a/sourcecodes/FSV.Configuration.UnitTest/FSV.Configuration.UnitTest.csproj +++ b/sourcecodes/FSV.Configuration.UnitTest/FSV.Configuration.UnitTest.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows default false false @@ -9,7 +9,7 @@ FSV.Configuration.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 FSV.Configuration.UnitTest @@ -20,9 +20,9 @@ - - - - + + + + \ No newline at end of file diff --git a/sourcecodes/FSV.Configuration/FSV.Configuration.csproj b/sourcecodes/FSV.Configuration/FSV.Configuration.csproj index 4174ede..c9dd4ad 100644 --- a/sourcecodes/FSV.Configuration/FSV.Configuration.csproj +++ b/sourcecodes/FSV.Configuration/FSV.Configuration.csproj @@ -5,7 +5,7 @@ Library true ..\ - net8.0-windows + net9.0-windows true @@ -18,11 +18,11 @@ none FSV.Configuration - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -36,10 +36,11 @@ + - 1.0.118 + 2.0.2 - + diff --git a/sourcecodes/FSV.Console.UnitTest/FSV.Console.UnitTest.csproj b/sourcecodes/FSV.Console.UnitTest/FSV.Console.UnitTest.csproj index 6bb6c2e..2488627 100644 --- a/sourcecodes/FSV.Console.UnitTest/FSV.Console.UnitTest.csproj +++ b/sourcecodes/FSV.Console.UnitTest/FSV.Console.UnitTest.csproj @@ -2,25 +2,25 @@ FSV.Console.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 false Library FSV.Console.UnitTest - net8.0-windows + net9.0-windows - 17.10.0 + 18.0.1 - 4.20.70 + 4.20.72 - 3.5.0 + 4.0.2 - 3.5.0 + 4.0.2 diff --git a/sourcecodes/FSV.Console/FSV.Console.csproj b/sourcecodes/FSV.Console/FSV.Console.csproj index 029fd4b..25a9657 100644 --- a/sourcecodes/FSV.Console/FSV.Console.csproj +++ b/sourcecodes/FSV.Console/FSV.Console.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Exe fsv false @@ -19,11 +19,11 @@ none FSV.Console - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -68,17 +68,17 @@ 1.1.1 - 8.1.97 + 9.0.537 - 1.0.118 + 1.0.119 - 1.0.118 + 2.0.2 - - + + diff --git a/sourcecodes/FSV.Crypto.Abstractions/FSV.Crypto.Abstractions.csproj b/sourcecodes/FSV.Crypto.Abstractions/FSV.Crypto.Abstractions.csproj index a7b12a8..6f6d866 100644 --- a/sourcecodes/FSV.Crypto.Abstractions/FSV.Crypto.Abstractions.csproj +++ b/sourcecodes/FSV.Crypto.Abstractions/FSV.Crypto.Abstractions.csproj @@ -1,15 +1,15 @@ none - 2.8.1 + 2.9.0 Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecuriyViewer - net8.0 + net9.0 2.4.1 \ No newline at end of file diff --git a/sourcecodes/FSV.Crypto.UnitTest/FSV.Crypto.UnitTest.csproj b/sourcecodes/FSV.Crypto.UnitTest/FSV.Crypto.UnitTest.csproj index 3e54e09..e1e652b 100644 --- a/sourcecodes/FSV.Crypto.UnitTest/FSV.Crypto.UnitTest.csproj +++ b/sourcecodes/FSV.Crypto.UnitTest/FSV.Crypto.UnitTest.csproj @@ -2,13 +2,13 @@ FSV.Crypto.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 false latest Library FSV.Crypto.UnitTest - net8.0-windows + net9.0-windows @@ -16,13 +16,13 @@ - 17.10.0 + 18.0.1 - 3.5.0 + 4.0.2 - 3.5.0 + 4.0.2 \ No newline at end of file diff --git a/sourcecodes/FSV.Crypto.UnitTest/SecureTest.cs b/sourcecodes/FSV.Crypto.UnitTest/SecureTest.cs index 30636b0..0533e27 100644 --- a/sourcecodes/FSV.Crypto.UnitTest/SecureTest.cs +++ b/sourcecodes/FSV.Crypto.UnitTest/SecureTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -26,7 +26,7 @@ namespace FSV.Crypto.UnitTest [TestClass] public class SecureTest { - private const string password = "Abc#123"; + private const string Password = "Abc#123"; [TestMethod] public void Secure_EncryptFromSecureString_Empty_test() @@ -42,18 +42,18 @@ public void Secure_EncryptFromSecureString_Empty_test() public void Secure_EncryptFromSecureString_Entropy_test() { ISecure secure = new Secure(); - SecureString secureString = this.GetSecureString(password); + SecureString secureString = this.GetSecureString(Password); string encrypted = secure.EncryptFromSecureString(secureString); Assert.IsNotNull(encrypted); - Assert.IsFalse(password.Equals(encrypted)); + Assert.IsFalse(Password.Equals(encrypted)); } [TestMethod] public void Secure_EncryptFromSecureString_NoEntropy_test() { ISecure secure = new Secure(); - SecureString secureString = this.GetSecureString(password); + SecureString secureString = this.GetSecureString(Password); string encryptedWithEntropy = secure.EncryptFromSecureString(secureString); string encryptedWithoutEntropy = secure.EncryptFromSecureString(secureString, false); @@ -79,10 +79,10 @@ public void Secure_DecryptToSecureString_Entropy_test() { ISecure secure = new Secure(); - string encrypted = secure.EncryptFromSecureString(this.GetSecureString(password)); + string encrypted = secure.EncryptFromSecureString(this.GetSecureString(Password)); SecureString decrypted = secure.DecryptToSecureString(encrypted); - Assert.AreEqual(password.Length, decrypted.Length); + Assert.AreEqual(Password.Length, decrypted.Length); } [TestMethod] @@ -90,10 +90,10 @@ public void Secure_DecryptToSecureString_NoEntropy_test() { ISecure secure = new Secure(); - string encrypted = secure.EncryptFromSecureString(this.GetSecureString(password), false); + string encrypted = secure.EncryptFromSecureString(this.GetSecureString(Password), false); SecureString decrypted = secure.DecryptToSecureString(encrypted, false); - Assert.AreEqual(password.Length, decrypted.Length); + Assert.AreEqual(Password.Length, decrypted.Length); } [TestMethod] @@ -101,9 +101,9 @@ public void Secure_DecryptToSecureString_different_entropies_encrypt_false_decry { ISecure secure = new Secure(); - string encrypted = secure.EncryptFromSecureString(this.GetSecureString(password), false); + string encrypted = secure.EncryptFromSecureString(this.GetSecureString(Password), false); - Assert.ThrowsException(() => secure.DecryptToSecureString(encrypted)); + Assert.Throws(() => secure.DecryptToSecureString(encrypted)); } [TestMethod] @@ -111,16 +111,16 @@ public void Secure_DecryptToSecureString_different_entropies_encrypt_true_decryp { ISecure secure = new Secure(); - string encrypted = secure.EncryptFromSecureString(this.GetSecureString(password)); + string encrypted = secure.EncryptFromSecureString(this.GetSecureString(Password)); - Assert.ThrowsException(() => secure.DecryptToSecureString(encrypted, false)); + Assert.Throws(() => secure.DecryptToSecureString(encrypted, false)); } [TestMethod] public void Secure_GetBytes_test() { ISecure secure = new Secure(); - using SecureString secureString = this.GetSecureString(password); + using SecureString secureString = this.GetSecureString(Password); IEnumerable bytes = secure.GetBytes(secureString); diff --git a/sourcecodes/FSV.Crypto/FSV.Crypto.csproj b/sourcecodes/FSV.Crypto/FSV.Crypto.csproj index fe5b139..7d6cc47 100644 --- a/sourcecodes/FSV.Crypto/FSV.Crypto.csproj +++ b/sourcecodes/FSV.Crypto/FSV.Crypto.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library false @@ -14,11 +14,11 @@ none FSV.Crypto - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecuriyViewer @@ -27,8 +27,8 @@ - - - + + + \ No newline at end of file diff --git a/sourcecodes/FSV.CsvExporter/FSV.CsvExporter.csproj b/sourcecodes/FSV.CsvExporter/FSV.CsvExporter.csproj index 1a45069..ef1964c 100644 --- a/sourcecodes/FSV.CsvExporter/FSV.CsvExporter.csproj +++ b/sourcecodes/FSV.CsvExporter/FSV.CsvExporter.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false @@ -14,11 +14,11 @@ none FSV.CsvExporter - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -28,7 +28,7 @@ - 33.0.1 + 33.1.0 \ No newline at end of file diff --git a/sourcecodes/FSV.Database.UnitTest/FSV.Database.UnitTest.csproj b/sourcecodes/FSV.Database.UnitTest/FSV.Database.UnitTest.csproj index 62bec4f..a491063 100644 --- a/sourcecodes/FSV.Database.UnitTest/FSV.Database.UnitTest.csproj +++ b/sourcecodes/FSV.Database.UnitTest/FSV.Database.UnitTest.csproj @@ -2,26 +2,26 @@ FSV.Database.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 false default Library FSV.Database.UnitTest - net8.0-windows + net9.0-windows - 17.10.0 + 18.0.1 - 3.5.0 + 4.0.2 - 3.5.0 + 4.0.2 \ No newline at end of file diff --git a/sourcecodes/FSV.Database/FSV.Database.csproj b/sourcecodes/FSV.Database/FSV.Database.csproj index 8332bcb..91270ec 100644 --- a/sourcecodes/FSV.Database/FSV.Database.csproj +++ b/sourcecodes/FSV.Database/FSV.Database.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library false @@ -14,11 +14,11 @@ none FSV.Database - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -53,8 +53,8 @@ - 1.0.118 + 2.0.2 - + \ No newline at end of file diff --git a/sourcecodes/FSV.EMailService/FSV.EMailService.csproj b/sourcecodes/FSV.EMailService/FSV.EMailService.csproj index fa655a6..6f6e14d 100644 --- a/sourcecodes/FSV.EMailService/FSV.EMailService.csproj +++ b/sourcecodes/FSV.EMailService/FSV.EMailService.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false @@ -14,11 +14,11 @@ none FSV.EMailService - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer diff --git a/sourcecodes/FSV.ExcelExporter/FSV.ExcelExporter.csproj b/sourcecodes/FSV.ExcelExporter/FSV.ExcelExporter.csproj index 1620f08..bd26ef9 100644 --- a/sourcecodes/FSV.ExcelExporter/FSV.ExcelExporter.csproj +++ b/sourcecodes/FSV.ExcelExporter/FSV.ExcelExporter.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false @@ -14,11 +14,11 @@ none FSV.ExcelExporter - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -28,7 +28,7 @@ - 0.102.3 + 0.105.0 \ No newline at end of file diff --git a/sourcecodes/FSV.Extensions.DependencyInjection.UnitTest/FSV.Extensions.DependencyInjection.UnitTest.csproj b/sourcecodes/FSV.Extensions.DependencyInjection.UnitTest/FSV.Extensions.DependencyInjection.UnitTest.csproj index 218de9a..295b4c6 100644 --- a/sourcecodes/FSV.Extensions.DependencyInjection.UnitTest/FSV.Extensions.DependencyInjection.UnitTest.csproj +++ b/sourcecodes/FSV.Extensions.DependencyInjection.UnitTest/FSV.Extensions.DependencyInjection.UnitTest.csproj @@ -1,20 +1,20 @@ - net8.0-windows + net9.0-windows false default - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/sourcecodes/FSV.Extensions.DependencyInjection/FSV.Extensions.DependencyInjection.csproj b/sourcecodes/FSV.Extensions.DependencyInjection/FSV.Extensions.DependencyInjection.csproj index 8c8cac6..e435c3b 100644 --- a/sourcecodes/FSV.Extensions.DependencyInjection/FSV.Extensions.DependencyInjection.csproj +++ b/sourcecodes/FSV.Extensions.DependencyInjection/FSV.Extensions.DependencyInjection.csproj @@ -1,16 +1,16 @@ - 2.8.1 + 2.9.0 G-TAC G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG false Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 latest en FolderSecurityViewer - net8.0 + net9.0 true @@ -18,7 +18,7 @@ none - - + + \ No newline at end of file diff --git a/sourcecodes/FSV.Extensions.Logging/FSV.Extensions.Logging.csproj b/sourcecodes/FSV.Extensions.Logging/FSV.Extensions.Logging.csproj index 356aaf5..990819e 100644 --- a/sourcecodes/FSV.Extensions.Logging/FSV.Extensions.Logging.csproj +++ b/sourcecodes/FSV.Extensions.Logging/FSV.Extensions.Logging.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false true @@ -8,25 +8,25 @@ FSV.Extensions.Logging - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer - 4.0.0 + 4.3.0 - 8.0.0 + 9.0.2 - 6.0.0 + 7.0.0 - + diff --git a/sourcecodes/FSV.Extensions.Serialization.UnitTest/FSV.Extensions.Serialization.UnitTest.csproj b/sourcecodes/FSV.Extensions.Serialization.UnitTest/FSV.Extensions.Serialization.UnitTest.csproj index d240158..9d2909d 100644 --- a/sourcecodes/FSV.Extensions.Serialization.UnitTest/FSV.Extensions.Serialization.UnitTest.csproj +++ b/sourcecodes/FSV.Extensions.Serialization.UnitTest/FSV.Extensions.Serialization.UnitTest.csproj @@ -3,16 +3,16 @@ false true latest - net8.0-windows + net9.0-windows - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/sourcecodes/FSV.Extensions.Serialization/FSV.Extensions.Serialization.csproj b/sourcecodes/FSV.Extensions.Serialization/FSV.Extensions.Serialization.csproj index 21930c4..b289464 100644 --- a/sourcecodes/FSV.Extensions.Serialization/FSV.Extensions.Serialization.csproj +++ b/sourcecodes/FSV.Extensions.Serialization/FSV.Extensions.Serialization.csproj @@ -1,19 +1,19 @@ none - 2.8.1 + 2.9.0 G-TAC G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 latest FolderSecurityViewer - net8.0 + net9.0 2.6.0 - + diff --git a/sourcecodes/FSV.Extensions.WindowConfiguration.Test/FSV.Extensions.WindowConfiguration.Test.csproj b/sourcecodes/FSV.Extensions.WindowConfiguration.Test/FSV.Extensions.WindowConfiguration.Test.csproj index 3b7f284..8ef129d 100644 --- a/sourcecodes/FSV.Extensions.WindowConfiguration.Test/FSV.Extensions.WindowConfiguration.Test.csproj +++ b/sourcecodes/FSV.Extensions.WindowConfiguration.Test/FSV.Extensions.WindowConfiguration.Test.csproj @@ -1,42 +1,28 @@  - net8.0-windows + net9.0-windows FSV.Extensions.WindowConfiguration.Test FSV.Extensions.WindowConfiguration.Test - - - 3.5.0 - - - 3.5.0 - - - 2.9.0 - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - 4.20.70 + 4.20.72 - 21.0.26 + 22.0.16 - 21.0.26 - - - 1.1.11 + 22.0.16 + + diff --git a/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowConfigurationManagerTest.cs b/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowConfigurationManagerTest.cs index 3f730de..04043d6 100644 --- a/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowConfigurationManagerTest.cs +++ b/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowConfigurationManagerTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -16,17 +16,24 @@ namespace FSV.Extensions.WindowConfiguration.Test { - using System.IO; - using System.IO.Abstractions; - using System.IO.Abstractions.TestingHelpers; using Abstractions; + using Configuration.Abstractions; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; + using Moq; + using Serialization.Abstractions; + + using System.IO; + using System.IO.Abstractions; + using System.IO.Abstractions.TestingHelpers; + using System.Threading.Tasks; + using Xunit; - + public class WindowConfigurationManagerTest { [Fact] @@ -134,7 +141,7 @@ void Act() } [Fact] - public void WindowConfigurationManager_SaveAsync_Test() + public async Task WindowConfigurationManager_SaveAsync_Test() { // Arrange const WindowState windowState = WindowState.Maximized; @@ -142,7 +149,7 @@ public void WindowConfigurationManager_SaveAsync_Test() var settings = new Settings(expectedPosition); IMockFileDataAccessor mockFileDataAccessor = new MockFileSystem(); - using var stream = new MockFileStream(mockFileDataAccessor, "Window.json", FileMode.OpenOrCreate, FileAccess.ReadWrite); + await using var stream = new MockFileStream(mockFileDataAccessor, "Window.json", FileMode.OpenOrCreate, FileAccess.ReadWrite); var serializerMock = new Mock(); serializerMock.Setup(wrapper => wrapper.SerializeAsync(stream, settings)).Verifiable(); @@ -168,7 +175,7 @@ ISerializationWrapper SerializerFactory(SerializerType type) // Act sut.SetPosition(expectedPosition); - sut.SaveAsync(); + await sut.SaveAsync(); // Assert fileMock.Verify(file => file.Open(It.IsAny(), FileMode.OpenOrCreate), Times.Once); diff --git a/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowExtensionsTest.cs b/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowExtensionsTest.cs index 96ebbdd..99356e9 100644 --- a/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowExtensionsTest.cs +++ b/sourcecodes/FSV.Extensions.WindowConfiguration.Test/WindowExtensionsTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -16,9 +16,12 @@ namespace FSV.Extensions.WindowConfiguration.Test { - using System.Windows; using Abstractions; + + using System.Windows; + using Xunit; + using WindowState = System.Windows.WindowState; /// diff --git a/sourcecodes/FSV.Extensions.WindowConfiguration/FSV.Extensions.WindowConfiguration.csproj b/sourcecodes/FSV.Extensions.WindowConfiguration/FSV.Extensions.WindowConfiguration.csproj index 5a5cda2..fc76b72 100644 --- a/sourcecodes/FSV.Extensions.WindowConfiguration/FSV.Extensions.WindowConfiguration.csproj +++ b/sourcecodes/FSV.Extensions.WindowConfiguration/FSV.Extensions.WindowConfiguration.csproj @@ -5,16 +5,16 @@ true latest Library - net8.0-windows + net9.0-windows true FSV.Extensions.Configuration - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 FolderSecurityViewer @@ -27,10 +27,10 @@ - 21.0.26 + 22.0.16 - - - + + + \ No newline at end of file diff --git a/sourcecodes/FSV.FileSystem.Interop.Abstractions/FSV.FileSystem.Interop.Abstractions.csproj b/sourcecodes/FSV.FileSystem.Interop.Abstractions/FSV.FileSystem.Interop.Abstractions.csproj index 38a81fb..a195f65 100644 --- a/sourcecodes/FSV.FileSystem.Interop.Abstractions/FSV.FileSystem.Interop.Abstractions.csproj +++ b/sourcecodes/FSV.FileSystem.Interop.Abstractions/FSV.FileSystem.Interop.Abstractions.csproj @@ -1,16 +1,16 @@ none - 2.8.1 + 2.9.0 G-TAC G-TAC - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 latest 2.4.4 FolderSecurityViewer - net8.0 + net9.0 FSV.FileSystem.Interop.Abstractions 2.4.4.0 diff --git a/sourcecodes/FSV.FileSystem.Interop.Core.Abstractions/FSV.FileSystem.Interop.Core.Abstractions.csproj b/sourcecodes/FSV.FileSystem.Interop.Core.Abstractions/FSV.FileSystem.Interop.Core.Abstractions.csproj index 089c8fd..4aa2068 100644 --- a/sourcecodes/FSV.FileSystem.Interop.Core.Abstractions/FSV.FileSystem.Interop.Core.Abstractions.csproj +++ b/sourcecodes/FSV.FileSystem.Interop.Core.Abstractions/FSV.FileSystem.Interop.Core.Abstractions.csproj @@ -1,16 +1,16 @@ none - 2.8.1 + 2.9.0 Matthias Friedrich G-TAC - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 latest 2.4.4 FolderSecurityViewer - net8.0 + net9.0 FSV.FileSystem.Interop.Core.Abstractions 2.4.4.0 diff --git a/sourcecodes/FSV.FileSystem.Interop.Core/FSV.FileSystem.Interop.Core.csproj b/sourcecodes/FSV.FileSystem.Interop.Core/FSV.FileSystem.Interop.Core.csproj index 6c3215f..6069a52 100644 --- a/sourcecodes/FSV.FileSystem.Interop.Core/FSV.FileSystem.Interop.Core.csproj +++ b/sourcecodes/FSV.FileSystem.Interop.Core/FSV.FileSystem.Interop.Core.csproj @@ -1,16 +1,16 @@ none - 2.8.1 + 2.9.0 Matthias Friedrich G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 latest 2.4.4 FolderSecurityViewer - net8.0 + net9.0 FSV.FileSystem.Interop.Core 2.6.0.0 diff --git a/sourcecodes/FSV.FileSystem.Interop.UnitTest/DirectorySizeTest.cs b/sourcecodes/FSV.FileSystem.Interop.UnitTest/DirectorySizeTest.cs index 46a9df2..039b06d 100644 --- a/sourcecodes/FSV.FileSystem.Interop.UnitTest/DirectorySizeTest.cs +++ b/sourcecodes/FSV.FileSystem.Interop.UnitTest/DirectorySizeTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -43,9 +43,8 @@ public void DirectorySize_Get_Test() FolderSizeInfo actual = sut.AggregateSizeInfo(directoryPath, includeSubtrees, includeHiddenFolders); // Assert - Assert.IsNotNull(actual); - Assert.IsTrue(actual.Size > 0); - Assert.IsTrue(actual.FileCount > 0); + Assert.IsGreaterThan(0, actual.Size); + Assert.IsGreaterThan(0, actual.FileCount); } } } \ No newline at end of file diff --git a/sourcecodes/FSV.FileSystem.Interop.UnitTest/FSV.FileSystem.Interop.UnitTest.csproj b/sourcecodes/FSV.FileSystem.Interop.UnitTest/FSV.FileSystem.Interop.UnitTest.csproj index 87ccd59..7a4155a 100644 --- a/sourcecodes/FSV.FileSystem.Interop.UnitTest/FSV.FileSystem.Interop.UnitTest.csproj +++ b/sourcecodes/FSV.FileSystem.Interop.UnitTest/FSV.FileSystem.Interop.UnitTest.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library false latest @@ -9,7 +9,7 @@ FSV.FileSystem.Interop.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 FSV.FileSystem.Interop.UnitTest @@ -22,17 +22,17 @@ - 17.10.0 + 18.0.1 - 4.20.70 + 4.20.72 - 3.5.0 + 4.0.2 - 3.5.0 + 4.0.2 - + \ No newline at end of file diff --git a/sourcecodes/FSV.FileSystem.Interop.UnitTest/FindFileEnumeratorTest.cs b/sourcecodes/FSV.FileSystem.Interop.UnitTest/FindFileEnumeratorTest.cs index 703a9b9..8668ba9 100644 --- a/sourcecodes/FSV.FileSystem.Interop.UnitTest/FindFileEnumeratorTest.cs +++ b/sourcecodes/FSV.FileSystem.Interop.UnitTest/FindFileEnumeratorTest.cs @@ -1,4 +1,4 @@ -// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. +// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. // Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify @@ -37,7 +37,7 @@ public void FindFileEnumerator_ctor_Current_returns_default_Test() using var sut = new FindFileEnumerator(kernel32, kernel32FindFile, path); // Assert - Assert.AreEqual(sut.Current, default); + Assert.IsNull(sut.Current); } [TestMethod] @@ -45,7 +45,7 @@ public void FindFileEnumerator_MoveNext_Test() { // Arrange string path = Environment.CurrentDirectory; - const string expected = "net8.0-windows"; + const string expected = "net9.0-windows"; var kernel32 = new Kernel32Wrapper(); var kernel32FindFile = new Kernel32FindFileWrapper(); @@ -57,7 +57,8 @@ public void FindFileEnumerator_MoveNext_Test() // Assert Assert.IsTrue(actual); - + Assert.IsNotNull(sut.Current); + Win32FindData current = sut.Current.GetWin32FindData(false); Assert.AreNotEqual(default, current); Assert.AreEqual(expected, current.cFileName); @@ -77,11 +78,11 @@ public void FindFileEnumerator_Reset_starts_over_Test() sut.MoveNext(); // Act - bool actual = sut.MoveNext(); + sut.MoveNext(); sut.Reset(); // Assert - Assert.AreEqual(sut.Current, default); + Assert.IsNull(sut.Current); } } } \ No newline at end of file diff --git a/sourcecodes/FSV.FileSystem.Interop/FSV.FileSystem.Interop.csproj b/sourcecodes/FSV.FileSystem.Interop/FSV.FileSystem.Interop.csproj index ea5a94d..15f1f2b 100644 --- a/sourcecodes/FSV.FileSystem.Interop/FSV.FileSystem.Interop.csproj +++ b/sourcecodes/FSV.FileSystem.Interop/FSV.FileSystem.Interop.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false @@ -17,12 +17,12 @@ none FSV.FileSystem.Interop - 2.8.1 + 2.9.0 Matthias Friedrich G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -33,7 +33,7 @@ - + \ No newline at end of file diff --git a/sourcecodes/FSV.FolderTree/FSV.FolderTree.csproj b/sourcecodes/FSV.FolderTree/FSV.FolderTree.csproj index 3d67f70..6f4ce39 100644 --- a/sourcecodes/FSV.FolderTree/FSV.FolderTree.csproj +++ b/sourcecodes/FSV.FolderTree/FSV.FolderTree.csproj @@ -5,7 +5,7 @@ true Library true - net8.0-windows + net9.0-windows true @@ -64,7 +64,7 @@ - - + + \ No newline at end of file diff --git a/sourcecodes/FSV.HtmlExporter/FSV.HtmlExporter.csproj b/sourcecodes/FSV.HtmlExporter/FSV.HtmlExporter.csproj index fff571d..edfd156 100644 --- a/sourcecodes/FSV.HtmlExporter/FSV.HtmlExporter.csproj +++ b/sourcecodes/FSV.HtmlExporter/FSV.HtmlExporter.csproj @@ -12,15 +12,15 @@ none FSV.HtmlExporter - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 false en FolderSecurityViewer - net8.0 + net9.0 @@ -47,7 +47,7 @@ 9.0.0 - - + + \ No newline at end of file diff --git a/sourcecodes/FSV.Models/FSV.Models.csproj b/sourcecodes/FSV.Models/FSV.Models.csproj index 5269455..2d69f8c 100644 --- a/sourcecodes/FSV.Models/FSV.Models.csproj +++ b/sourcecodes/FSV.Models/FSV.Models.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library false @@ -14,11 +14,11 @@ none FSV.Models - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer @@ -26,6 +26,6 @@ - + \ No newline at end of file diff --git a/sourcecodes/FSV.Resources/FSV.Resources.csproj b/sourcecodes/FSV.Resources/FSV.Resources.csproj index e5bcc39..14d45e0 100644 --- a/sourcecodes/FSV.Resources/FSV.Resources.csproj +++ b/sourcecodes/FSV.Resources/FSV.Resources.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false @@ -16,9 +16,9 @@ Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" G-TAC Software UG, Katzweiler, Germany FolderSecurityViewer - Copyright © 2015 - 2024 G-TAC Software UG - 2.8.1 - 2.8.1 + Copyright © 2015 - 2025 G-TAC Software UG + 2.9.0 + 2.9.0 en none diff --git a/sourcecodes/FSV.Security/FSV.Security.csproj b/sourcecodes/FSV.Security/FSV.Security.csproj index b8137bc..3867017 100644 --- a/sourcecodes/FSV.Security/FSV.Security.csproj +++ b/sourcecodes/FSV.Security/FSV.Security.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false @@ -10,11 +10,11 @@ none FSV.Security - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en-US FolderSecurityViewer @@ -22,7 +22,7 @@ - - + + \ No newline at end of file diff --git a/sourcecodes/FSV.ShareServices.UnitTest/FSV.ShareServices.UnitTest.csproj b/sourcecodes/FSV.ShareServices.UnitTest/FSV.ShareServices.UnitTest.csproj index ac14347..fcd310f 100644 --- a/sourcecodes/FSV.ShareServices.UnitTest/FSV.ShareServices.UnitTest.csproj +++ b/sourcecodes/FSV.ShareServices.UnitTest/FSV.ShareServices.UnitTest.csproj @@ -3,26 +3,26 @@ none FSV.ShareServices.UnitTest 1.0.0.0 - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 false default Library FSV.ShareServices.UnitTest - net8.0-windows + net9.0-windows - 17.10.0 + 18.0.1 - 4.20.70 + 4.20.72 - 3.5.0 + 4.0.2 - 3.5.0 + 4.0.2 diff --git a/sourcecodes/FSV.ShareServices.UnitTest/ShareServersManagerTest.cs b/sourcecodes/FSV.ShareServices.UnitTest/ShareServersManagerTest.cs index 919017e..cf684be 100644 --- a/sourcecodes/FSV.ShareServices.UnitTest/ShareServersManagerTest.cs +++ b/sourcecodes/FSV.ShareServices.UnitTest/ShareServersManagerTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -38,7 +38,7 @@ public async Task ServerExists_False_test() await manager.GetServerListAsync(); bool result = manager.ServerExists("MyServer"); - Assert.AreEqual(false, result); + Assert.IsFalse(result); } [TestMethod] @@ -51,7 +51,7 @@ public async Task ServerExists_True_test() await manager.GetServerListAsync(); bool result = manager.ServerExists("WinServers"); - Assert.AreEqual(true, result); + Assert.IsTrue(result); } [TestMethod] @@ -67,7 +67,7 @@ public async Task CreateServer_test() Assert.AreEqual(ServerState.NotScanned, serverItem.State); Assert.AreEqual(serverName, serverItem.Name); - Assert.AreEqual(0, serverItem.Shares.Count); + Assert.IsEmpty(serverItem.Shares); } [TestMethod] @@ -85,7 +85,7 @@ public async Task CreateShare_test() ServerItem serverItem = manager.CreateServer(serverName); ShareItem shareItem = manager.CreateShare(serverItem, shareName, sharePath); - Assert.AreEqual(1, serverItem.Shares.Count); + Assert.HasCount(1, serverItem.Shares); Assert.AreEqual(shareName, shareItem.Name); Assert.AreEqual(sharePath, shareItem.Path); } diff --git a/sourcecodes/FSV.ShareServices/FSV.ShareServices.csproj b/sourcecodes/FSV.ShareServices/FSV.ShareServices.csproj index e49b842..d148fe0 100644 --- a/sourcecodes/FSV.ShareServices/FSV.ShareServices.csproj +++ b/sourcecodes/FSV.ShareServices/FSV.ShareServices.csproj @@ -1,16 +1,16 @@ none - 2.8.1 + 2.9.0 G-TAC G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 latest en FolderSecurityViewer - net8.0-windows + net9.0-windows 2.4.1 @@ -18,9 +18,9 @@ false - - - + + + diff --git a/sourcecodes/FSV.Templates/FSV.Templates.csproj b/sourcecodes/FSV.Templates/FSV.Templates.csproj index fa8a3d4..9b39567 100644 --- a/sourcecodes/FSV.Templates/FSV.Templates.csproj +++ b/sourcecodes/FSV.Templates/FSV.Templates.csproj @@ -14,11 +14,11 @@ none FSV.Templates - 2.8.1 + 2.9.0 G-TAC Software UG, Katzweiler, Germany - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG Part of G-TAC's NTFS Permissions Reporter "FolderSecurityViewer" - 2.8.1 + 2.9.0 en FolderSecurityViewer diff --git a/sourcecodes/FSV.ViewModel.UnitTest/AdBrowserViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/AdBrowserViewModelTest.cs index fb20c23..5d99ff0 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/AdBrowserViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/AdBrowserViewModelTest.cs @@ -1,4 +1,4 @@ -// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. +// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. // Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify @@ -26,13 +26,14 @@ namespace FSV.ViewModel.UnitTest using AdServices.EnumOU; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Prism.Events; - using Xunit; + [TestClass] public class AdBrowserViewModelTest { - [Fact] + [TestMethod] public async Task AdBrowserViewModel_SearchPrincipals_no_result_test() { const string principalName = "user_1202"; @@ -49,13 +50,13 @@ public async Task AdBrowserViewModel_SearchPrincipals_no_result_test() await sut.SearchPrincipalCommand.ExecuteAsync(null); // Assert - Assert.Equal(principalName, sut.PrincipalName); - Assert.Empty(sut.UserPrincipals); - Assert.False(sut.ShowUserList); - Assert.False(sut.CanReport); + Assert.AreEqual(principalName, sut.PrincipalName); + Assert.IsEmpty(sut.UserPrincipals); + Assert.IsFalse(sut.ShowUserList); + Assert.IsFalse(sut.CanReport); } - [Fact] + [TestMethod] public async Task AdBrowserViewModel_SearchPrincipals_single_result_test() { const string principalName = "user_1202"; @@ -72,24 +73,23 @@ public async Task AdBrowserViewModel_SearchPrincipals_single_result_test() await sut.SearchPrincipalCommand.ExecuteAsync(null); // Assert - Assert.Equal(principalName, sut.PrincipalName); - Assert.False(sut.ShowUserList); - Assert.True(sut.CanReport); + Assert.AreEqual(principalName, sut.PrincipalName); + Assert.IsFalse(sut.ShowUserList); + Assert.IsTrue(sut.CanReport); - Assert.Collection(sut.UserPrincipals, - item => + foreach (AdTreeViewModel item in sut.UserPrincipals) + { + if (item is null) { - if (item is null) - { - throw new ArgumentNullException(nameof(item)); - } - - Assert.Equal(principalName, item.SamAccountName); - Assert.Equal(TreeViewNodeType.User, item.Type); - }); + throw new ArgumentNullException(nameof(item)); + } + + Assert.AreEqual(principalName, item.SamAccountName); + Assert.AreEqual(TreeViewNodeType.User, item.Type); + } } - [Fact] + [TestMethod] public async Task AdBrowserViewModel_SearchPrincipals_collection_result_test() { const string principalName = "*12*"; @@ -106,31 +106,30 @@ public async Task AdBrowserViewModel_SearchPrincipals_collection_result_test() await sut.SearchPrincipalCommand.ExecuteAsync(null); // Assert - Assert.True(sut.ShowUserList); - Assert.Collection(sut.UserPrincipals, - item => + Assert.IsTrue(sut.ShowUserList); + foreach (AdTreeViewModel item in sut.UserPrincipals) + { + if (item is null) { - if (item is null) - { - throw new ArgumentNullException(nameof(item)); - } - - Assert.Equal("user_display", item.DistinguishedName); - Assert.Equal(TreeViewNodeType.User, item.Type); - }, - item => + throw new ArgumentNullException(nameof(item)); + } + + switch (item.Type) { - if (item is null) - { - throw new ArgumentNullException(nameof(item)); - } - - Assert.Equal("group_display", item.DistinguishedName); - Assert.Equal(TreeViewNodeType.Group, item.Type); - }); + case TreeViewNodeType.User: + Assert.AreEqual("user_display", item.DistinguishedName); + break; + case TreeViewNodeType.Group: + Assert.AreEqual("group_display", item.DistinguishedName); + break; + default: + Assert.Fail("unexpected item type"); + break; + } + } } - [Fact] + [TestMethod] public async Task AdBrowserViewModel_selection_test() { const string principalName = "user1203"; @@ -154,9 +153,13 @@ public async Task AdBrowserViewModel_selection_test() IPrincipalViewModel selectedItem = GetSelectedPrincipal(sut.Principals); // Assert - Assert.Collection(sut.Principals, item => Assert.Equal("the_domain.test", item.DisplayName)); - Assert.NotNull(selectedItem); - Assert.Equal(principalName, selectedItem.SamAccountName); + foreach (IPrincipalViewModel item in sut.Principals) + { + Assert.AreEqual("the_domain.test", item.DisplayName); + } + + Assert.IsNotNull(selectedItem); + Assert.AreEqual(principalName, selectedItem.SamAccountName); } private IServiceProvider ConfigureAllServices(Mock mockAdBrowserService) diff --git a/sourcecodes/FSV.ViewModel.UnitTest/DomainViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/DomainViewModelTest.cs index 6f88e6c..0c7b772 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/DomainViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/DomainViewModelTest.cs @@ -1,4 +1,4 @@ -// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. +// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. // Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify @@ -17,6 +17,7 @@ namespace FSV.ViewModel.UnitTest { using System; + using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -25,12 +26,13 @@ namespace FSV.ViewModel.UnitTest using AdServices.EnumOU; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; - using Xunit; + [TestClass] public class DomainViewModelTest { - [Fact] + [TestMethod] public async Task DomainViewModel_Initialize_for_computers_test() { const string domainName = "test.local"; @@ -45,18 +47,18 @@ public async Task DomainViewModel_Initialize_for_computers_test() await sut.InitializeAsync(); // Assert - Assert.NotNull(sut.Items); - Assert.Null(sut.Parent); + Assert.IsNotNull(sut.Items); + Assert.IsNull(sut.Parent); - Assert.All(sut.Items, - item => - { - Assert.IsType(item); - Assert.NotNull(item.Parent); - }); + ICollection list = sut.Items.ToList(); + CollectionAssert.AllItemsAreInstancesOfType(list, typeof(ComputerPrincipalViewModel)); + foreach (IPrincipalViewModel item in sut.Items) + { + Assert.IsNotNull(item.Parent); + } } - [Fact] + [TestMethod] public async Task DomainViewModel_Initialize_for_principals_test() { const string domainName = "test.local"; @@ -71,15 +73,14 @@ public async Task DomainViewModel_Initialize_for_principals_test() await sut.InitializeAsync(); // Assert - Assert.NotNull(sut.Items); - Assert.Null(sut.Parent); + Assert.IsNotNull(sut.Items); + Assert.IsNull(sut.Parent); - Assert.All(sut.Items, - item => - { - Assert.IsType(item); - Assert.NotNull(item.Parent); - }); + CollectionAssert.AllItemsAreInstancesOfType(sut.Items.ToList(), typeof(PrincipalViewModel)); + foreach (IPrincipalViewModel item in sut.Items) + { + Assert.IsNotNull(item.Parent); + } } private IServiceProvider ConfigureAllServices(IAdBrowserService adBrowserService) diff --git a/sourcecodes/FSV.ViewModel.UnitTest/FSV.ViewModel.UnitTest.csproj b/sourcecodes/FSV.ViewModel.UnitTest/FSV.ViewModel.UnitTest.csproj index 94595dc..ca0797e 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/FSV.ViewModel.UnitTest.csproj +++ b/sourcecodes/FSV.ViewModel.UnitTest/FSV.ViewModel.UnitTest.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows Library false latest @@ -9,7 +9,7 @@ true FSV.ViewModel.UnitTest FSV.ViewModel.UnitTest - Copyright © 2015 - 2024 G-TAC Software UG + Copyright © 2015 - 2025 G-TAC Software UG 1.0.0.0 1.0.0.0 none @@ -18,22 +18,16 @@ - + - 17.10.0 + 18.0.1 - 4.20.70 + 4.20.72 - + - 3.5.0 - - - 2.9.0 - - - 1.1.11 + 4.0.2 diff --git a/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemSelectorTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemSelectorTest.cs index 0b33790..6d41eef 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemSelectorTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemSelectorTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -25,12 +25,13 @@ namespace FSV.ViewModel.UnitTest using Abstractions; using Home; using Microsoft.Extensions.DependencyInjection; + using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; - using Xunit; + [TestClass] public class FolderTreeItemSelectorTest { - [Fact] + [TestMethod] public async Task FolderTreeItemSelector_GetNextAsync_returns_expected_folder_test() { // Arrange @@ -56,10 +57,15 @@ public async Task FolderTreeItemSelector_GetNextAsync_returns_expected_folder_te actualFolders.Add(resultFolder?.Path); } - Assert.Equal(expectedFolders, actualFolders, StringComparer.OrdinalIgnoreCase); + for (var i = 0; i < expectedFolders.Length && i < actualFolders.Count; i++) + { + string expectedFolder = expectedFolders[i]; + string actualFolder = actualFolders[i]; + Assert.AreEqual(0, StringComparer.OrdinalIgnoreCase.Compare(expectedFolder, actualFolder)); + } } - [Fact] + [TestMethod] public async Task FolderTreeItemSelector_GetNextAsync_null_is_returned_from_folderFactory_test() { // Arrange @@ -71,10 +77,10 @@ public async Task FolderTreeItemSelector_GetNextAsync_null_is_returned_from_fold // Act FolderTreeItemViewModel result = await sut.GetNextAsync("s", selectedFolder); - Assert.Equal(selectedFolder, result); + Assert.AreEqual(selectedFolder, result); } - [Fact] + [TestMethod] public async Task FolderTreeItemSelector_GetNextAsync_null_is_returned_when_key_not_found_test() { // Arrange @@ -86,7 +92,7 @@ public async Task FolderTreeItemSelector_GetNextAsync_null_is_returned_when_key_ // Act FolderTreeItemViewModel result = await sut.GetNextAsync("master", selectedFolder); - Assert.Null(result); + Assert.IsNull(result); } private IFolderTreeItemSelector GetFolderTreeItemSelector(IEnumerable folders) diff --git a/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemViewModelTest.cs index c021a75..f7553e8 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/FolderTreeItemViewModelTest.cs @@ -1,4 +1,4 @@ -// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. +// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. // Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify @@ -20,15 +20,16 @@ namespace FSV.ViewModel.UnitTest using FolderTree; using Home; using JetBrains.Annotations; - using Xunit; + using Microsoft.VisualStudio.TestTools.UnitTesting; + [TestClass] public class FolderTreeItemViewModelTest { - [Fact] + [TestMethod] public void FolderTreeItemViewModel_null_equality_test() { // Arrange - FolderModel model = this.GetFolerModel("Folder", @"path\to\some\folder"); + FolderModel model = this.GetFolderModel("Folder", @"path\to\some\folder"); var sut = new FolderTreeItemViewModel(model); @@ -36,14 +37,14 @@ public void FolderTreeItemViewModel_null_equality_test() bool result = sut.Equals(null); // Assert - Assert.False(result); + Assert.IsFalse(result); } - [Fact] + [TestMethod] public void FolderTreeItemViewModel_same_reference_equality_test() { // Arrange - FolderModel model = this.GetFolerModel("Folder", @"path\to\some\folder"); + FolderModel model = this.GetFolderModel("Folder", @"path\to\some\folder"); var sut = new FolderTreeItemViewModel(model); FolderTreeItemViewModel reference = sut; @@ -52,15 +53,15 @@ public void FolderTreeItemViewModel_same_reference_equality_test() bool result = sut.Equals(reference); // Assert - Assert.True(result); + Assert.IsTrue(result); } - [Fact] + [TestMethod] public void FolderTreeItemViewModel_path_equality_test() { // Arrange - FolderModel modelOne = this.GetFolerModel("Folder", @"path\to\some\folder"); - FolderModel modelTwo = this.GetFolerModel("Folder", @"path\to\some\folder"); + FolderModel modelOne = this.GetFolderModel("Folder", @"path\to\some\folder"); + FolderModel modelTwo = this.GetFolderModel("Folder", @"path\to\some\folder"); var sut = new FolderTreeItemViewModel(modelOne); var other = new FolderTreeItemViewModel(modelTwo); @@ -69,10 +70,10 @@ public void FolderTreeItemViewModel_path_equality_test() bool result = sut.Equals(other); // Assert - Assert.True(result); + Assert.IsTrue(result); } - private FolderModel GetFolerModel([NotNull] string name, [NotNull] string path) + private FolderModel GetFolderModel([NotNull] string name, [NotNull] string path) { if (string.IsNullOrWhiteSpace(name)) { diff --git a/sourcecodes/FSV.ViewModel.UnitTest/GroupMembersViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/GroupMembersViewModelTest.cs index 73f53fa..9ce765a 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/GroupMembersViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/GroupMembersViewModelTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -45,12 +45,12 @@ public async Task GroupMembersViewModel_list_test() await sut.InitializeAsync(); - Assert.AreEqual(sut.GroupMembers.Count, 2); - Assert.AreEqual(sut.GroupMembers.First().AccountName, "User One"); - Assert.AreEqual(sut.GroupMembers.First().IsGroup, false); + Assert.HasCount(2, sut.GroupMembers); + Assert.AreEqual("User One", sut.GroupMembers.First().AccountName); + Assert.IsFalse(sut.GroupMembers.First().IsGroup); - Assert.AreEqual(sut.GroupMembers.Last().AccountName, "Group Two"); - Assert.AreEqual(sut.GroupMembers.Last().IsGroup, true); + Assert.AreEqual("Group Two", sut.GroupMembers.Last().AccountName); + Assert.IsTrue(sut.GroupMembers.Last().IsGroup); } [TestMethod] @@ -68,7 +68,7 @@ public async Task GroupMembersViewModel_export_table_generator_test() DataTable exportTable = sut.GetGroupMembersDataTable(vm); Assert.IsNotNull(exportTable); - Assert.AreEqual(vm.GroupMembers.Count, exportTable.Rows.Count); + Assert.HasCount(vm.GroupMembers.Count, exportTable.Rows); } private IServiceProvider ConfigureAllServices(ServiceCollection services) diff --git a/sourcecodes/FSV.ViewModel.UnitTest/GroupPermissionsViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/GroupPermissionsViewModelTest.cs index 36ad178..330db2b 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/GroupPermissionsViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/GroupPermissionsViewModelTest.cs @@ -1,4 +1,4 @@ -// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. +// FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. // Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify @@ -49,7 +49,7 @@ public async Task GroupPermissionsViewModel_paged_permissions_test() // Assert Assert.AreSame(permissions, sut.AllPermissions); Assert.IsNotNull(sut.PagedPermissions); - Assert.AreEqual(20, sut.PagedPermissions.Rows.Count); + Assert.HasCount(20, sut.PagedPermissions.Rows); } private static DataTable GetMockDataTable() @@ -98,7 +98,7 @@ private static MemoryStream GetXmlResource() var bytes = new byte[stream.Length]; - stream.Read(bytes, 0, bytes.Length); + stream.ReadExactly(bytes, 0, bytes.Length); stream.Close(); var memoryStream = new MemoryStream(); diff --git a/sourcecodes/FSV.ViewModel.UnitTest/PermissionsViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/PermissionsViewModelTest.cs index 3e17381..8b2124c 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/PermissionsViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/PermissionsViewModelTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -96,7 +96,7 @@ public void PermissionsViewModel_export_table_generator_test() DataTable result = sut.GetPermissionsSortTable(vm); Assert.AreEqual(vm.AllPermissions.TableName, result.TableName); - Assert.AreEqual(vm.AllPermissions.Rows.Count, result.Rows.Count); + Assert.HasCount(vm.AllPermissions.Rows.Count, result.Rows); } private static PermissionsViewModel CreatePermissionsViewModel() diff --git a/sourcecodes/FSV.ViewModel.UnitTest/PrincipalMembershipViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/PrincipalMembershipViewModelTest.cs index ce1590a..d4c1d1d 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/PrincipalMembershipViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/PrincipalMembershipViewModelTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -45,9 +45,9 @@ public async Task PrincipalMembershipViewModel_list_test() await sut.InitializeAsync(); - Assert.AreEqual(sut.Groups.Count, 2); - Assert.AreEqual(sut.Groups.First().AccountName, "Finance"); - Assert.AreEqual(sut.Groups.First().IsGroup, true); + Assert.HasCount(2, sut.Groups); + Assert.AreEqual("Finance", sut.Groups.First().AccountName); + Assert.IsTrue(sut.Groups.First().IsGroup); } [TestMethod] @@ -65,7 +65,7 @@ public async Task PrincipalMembershipViewModel_export_table_generator_test() DataTable exportTable = sut.GetPrincipalMembershipDataTable(vm); Assert.IsNotNull(exportTable); - Assert.AreEqual(vm.Groups.Count, exportTable.Rows.Count); + Assert.HasCount(vm.Groups.Count, exportTable.Rows); } private IServiceProvider ConfigureAllServices(ServiceCollection services) diff --git a/sourcecodes/FSV.ViewModel.UnitTest/SharedServerViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/SharedServerViewModelTest.cs index f6f12d5..c8d21da 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/SharedServerViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/SharedServerViewModelTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -43,7 +43,7 @@ public void SharedServerViewModel_StartScan_test() sut.ListSharesCommand.Execute(null); - Assert.AreEqual(2, sut.Shares.Count); + Assert.HasCount(2, sut.Shares); } private ServerItem GetServer() @@ -91,7 +91,7 @@ private Mock GetMockShareScannerFactory() private Mock GetMockShareScanner() { - Share GetShare(string server, string name) + static Share GetShare(string name) { return new Share { @@ -104,7 +104,19 @@ Share GetShare(string server, string name) }; } - IList GetSharesOfServer(string server) + var mockShareScanner = new Mock(); + mockShareScanner.Setup(m => m.GetShare(It.IsAny(), It.IsAny())) + .Returns((string _, string name) => GetShare(name)); + + mockShareScanner.Setup(m => m.GetShareAsync(It.IsAny(), It.IsAny())) + .Returns((string _, string name) => Task.FromResult(GetShare(name))); + + mockShareScanner.Setup(m => m.GetSharesOfServerAsync(It.IsAny())) + .Returns((string _) => Task.FromResult(GetSharesOfServer())); + + return mockShareScanner; + + static IList GetSharesOfServer() { return new List { @@ -128,18 +140,6 @@ IList GetSharesOfServer(string server) } }; } - - var mockShareScanner = new Mock(); - mockShareScanner.Setup(m => m.GetShare(It.IsAny(), It.IsAny())) - .Returns((string server, string name) => GetShare(server, name)); - - mockShareScanner.Setup(m => m.GetShareAsync(It.IsAny(), It.IsAny())) - .Returns((string server, string name) => Task.FromResult(GetShare(server, name))); - - mockShareScanner.Setup(m => m.GetSharesOfServerAsync(It.IsAny())) - .Returns((string server) => Task.FromResult(GetSharesOfServer(server))); - - return mockShareScanner; } private Mock GetMockDispatcherService() @@ -164,7 +164,7 @@ private Mock GetShareServersManagerMock() mockShareServersManager .Setup(m => m.CreateShare(It.IsAny(), It.IsAny(), It.IsAny())) - .Returns((ServerItem server, string name, string path) => new ShareItem(name, path)); + .Returns((ServerItem _, string name, string path) => new ShareItem(name, path)); return mockShareServersManager; } diff --git a/sourcecodes/FSV.ViewModel.UnitTest/TemplateContainerViewModelTest.cs b/sourcecodes/FSV.ViewModel.UnitTest/TemplateContainerViewModelTest.cs index 1913a0a..8728601 100644 --- a/sourcecodes/FSV.ViewModel.UnitTest/TemplateContainerViewModelTest.cs +++ b/sourcecodes/FSV.ViewModel.UnitTest/TemplateContainerViewModelTest.cs @@ -1,5 +1,5 @@ // FolderSecurityViewer is an easy-to-use NTFS permissions tool that helps you effectively trace down all security owners of your data. -// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite +// Copyright (C) 2015 - 2024 Carsten Schäfer, Matthias Friedrich, and Ritesh Gite // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -50,7 +50,7 @@ public async Task TemplateContainerViewModel_Add_test() _ = sut.ShowTemplateEditor(TemplateType.PermissionReport, "some/test/path"); - Assert.AreEqual(3, sut.Templates.Count); + Assert.HasCount(3, sut.Templates); Assert.AreEqual(TestTemplateName, sut.Templates.Last().Name); } @@ -68,7 +68,7 @@ public async Task TemplateContainerViewModel_Remove_test() sut.RemoveTemplateCommand.Execute(null); - Assert.AreEqual(1, sut.Templates.Count); + Assert.HasCount(1, sut.Templates); Assert.AreEqual("Three One", sut.Templates.First().Name); } @@ -119,7 +119,7 @@ private Mock GetMockTemplateFile() "; XDocument document = XDocument.Parse(xml); - List