Skip to content

feat: enable mocking the IFileVersionInfo #2204

feat: enable mocking the IFileVersionInfo

feat: enable mocking the IFileVersionInfo #2204

GitHub Actions / Test Results failed Jan 10, 2025 in 0s

2 fail, 2 974 skipped, 52 228 pass in 22m 18s

     46 files  ±0       46 suites  ±0   22m 18s ⏱️ +7s
 55 204 tests +4   52 228 ✅ +4   2 974 💤 ±0   2 ❌ ±0 
114 428 runs  ±0  102 115 ✅ ±0  12 301 💤 ±0  12 ❌ ±0 

Results for commit c6359a3. ± Comparison against earlier commit 74c8fd1.

Annotations

Check warning on line 0 in Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests.MockFileSystemTests

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: Operations_WhenValueContainsIllegalPathCharacters_ShouldThrowArgumentException_OnNetFramework(callback:…me", ignoreParamCheck: True) (Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests.MockFileSystemTests)

artifacts/Windows-artifacts/TestResults/Testably.Abstractions.Tests_net6.0.trx [took 0s]
artifacts/Windows-artifacts/TestResults/Testably.Abstractions.Tests_net7.0.trx [took 0s]
artifacts/Windows-artifacts/TestResults/Testably.Abstractions.Tests_net8.0.trx [took 0s]
Raw output
Expected type to have HResult set to -2147024894
because fileVersionInfoFactory => fileVersionInfoFactory.GetVersionInfo(value(Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests`1+<>c__DisplayClass5_0[Testably.Abstractions.Testing.MockFileSystem]).value)
 contains invalid path characters for 'fileName' (ignored: True), but found -2147024773.   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
   at Testably.Abstractions.TestHelpers.AssertionHelpers.AssertExceptionHResult[TException](TException exception, Nullable`1 hResult, String because, Object[] becauseArgs) in D:\a\Testably.Abstractions\Testably.Abstractions\Tests\Helpers\Testably.Abstractions.TestHelpers\AssertionHelpers.cs:line 110
   at Testably.Abstractions.TestHelpers.AssertionHelpers.BeException[TException](ObjectAssertions objectAssertions, String messageContains, Nullable`1 hResult, String paramName, String because, Object[] becauseArgs) in D:\a\Testably.Abstractions\Testably.Abstractions\Tests\Helpers\Testably.Abstractions.TestHelpers\AssertionHelpers.cs:line 33
   at Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests`1.Operations_WhenValueContainsIllegalPathCharacters_ShouldThrowArgumentException_OnNetFramework(Expression`1 callback, String paramName, Boolean ignoreParamCheck) in D:\a\Testably.Abstractions\Testably.Abstractions\Tests\Testably.Abstractions.Tests\FileSystem\FileVersionInfoFactory\ExceptionTests.cs:line 35
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check warning on line 0 in Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests.WindowsFileSystemTests

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 9 runs failed: Operations_WhenValueContainsIllegalPathCharacters_ShouldThrowArgumentException_OnNetFramework(callback: file…, ignoreParamCheck: True) (Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests.WindowsFileSystemTests)

artifacts/Linux-artifacts/TestResults/Testably.Abstractions.Tests_net6.0.trx [took 0s]
artifacts/Linux-artifacts/TestResults/Testably.Abstractions.Tests_net7.0.trx [took 0s]
artifacts/Linux-artifacts/TestResults/Testably.Abstractions.Tests_net8.0.trx [took 0s]
artifacts/Windows-artifacts/TestResults/Testably.Abstractions.Tests_net6.0.trx [took 0s]
artifacts/Windows-artifacts/TestResults/Testably.Abstractions.Tests_net7.0.trx [took 0s]
artifacts/Windows-artifacts/TestResults/Testably.Abstractions.Tests_net8.0.trx [took 0s]
artifacts/macOS-artifacts/TestResults/Testably.Abstractions.Tests_net6.0.trx [took 0s]
artifacts/macOS-artifacts/TestResults/Testably.Abstractions.Tests_net7.0.trx [took 0s]
artifacts/macOS-artifacts/TestResults/Testably.Abstractions.Tests_net8.0.trx [took 0s]
Raw output
Expected type to have HResult set to -2147024894
because fileVersionInfoFactory => fileVersionInfoFactory.GetVersionInfo(value(Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests`1+<>c__DisplayClass5_0[Testably.Abstractions.Testing.MockFileSystem]).value)
 contains invalid path characters for 'fileName' (ignored: True), but found -2147024773.   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
   at Testably.Abstractions.TestHelpers.AssertionHelpers.AssertExceptionHResult[TException](TException exception, Nullable`1 hResult, String because, Object[] becauseArgs) in /home/runner/work/Testably.Abstractions/Testably.Abstractions/Tests/Helpers/Testably.Abstractions.TestHelpers/AssertionHelpers.cs:line 110
   at Testably.Abstractions.TestHelpers.AssertionHelpers.BeException[TException](ObjectAssertions objectAssertions, String messageContains, Nullable`1 hResult, String paramName, String because, Object[] becauseArgs) in /home/runner/work/Testably.Abstractions/Testably.Abstractions/Tests/Helpers/Testably.Abstractions.TestHelpers/AssertionHelpers.cs:line 33
   at Testably.Abstractions.Tests.FileSystem.FileVersionInfoFactory.ExceptionTests`1.Operations_WhenValueContainsIllegalPathCharacters_ShouldThrowArgumentException_OnNetFramework(Expression`1 callback, String paramName, Boolean ignoreParamCheck) in /home/runner/work/Testably.Abstractions/Testably.Abstractions/Tests/Testably.Abstractions.Tests/FileSystem/FileVersionInfoFactory/ExceptionTests.cs:line 35