verifytests / emptyfiles Goto Github PK
View Code? Open in Web Editor NEWA collection of minimal binary files.
License: MIT License
A collection of minimal binary files.
License: MIT License
Skipping all the things you are request. will pair with you on it.
Using an example from README with a .NET Framework 4.8 project fails with The type initializer for 'EmptyFiles.AllFiles' threw an exception.
exception. I traced it to the AllFiles
static constructor, which calls FindEmptyFilesDirectory
. The function checks a couple of directory for the EmptyFiles
folder, and it crashes if it can't find it.
The same code works as expected when I change the target framework in the project file from net48
to net7
.
Here's an exception (running on Windows):
Could not find empty files directory. Searched:
* C:\Users\azima\AppData\Local\Temp\ReSharperTestRunner_ab0aedp5\bkphhiwt\EmptyFiles
* C:\Users\azima\AppData\Local\Temp\ReSharperTestRunner_ab0aedp5\bkphhiwt\EmptyFiles
Stack trace:
at EmptyFiles.AllFiles.FindEmptyFilesDirectory() in /_/src/EmptyFiles/AllFiles.cs:line 75
at EmptyFiles.AllFiles..cctor() in /_/src/EmptyFiles/AllFiles.cs:line 42
Full stack trace (running on macOS):
System.TypeInitializationException
The type initializer for 'EmptyFiles.AllFiles' threw an exception.
at DiffEngine.DiffRunner.TryCreate (DiffEngine.ResolvedTool tool, System.String targetFile) [0x00012] in C:\projects\diffengine\src\DiffEngine\DiffRunner.cs:198
at DiffEngine.DiffRunner.ShouldExitLaunch (DiffEngine.DiffRunner+TryResolveTool tryResolveTool, System.String targetFile, DiffEngine.ResolvedTool& tool, System.Nullable`1[DiffEngine.LaunchResult]& result) [0x0002f] in C:\projects\diffengine\src\DiffEngine\DiffRunner.cs:183
at DiffEngine.DiffRunner.InnerLaunchAsync (DiffEngine.DiffRunner+TryResolveTool tryResolveTool, System.String tempFile, System.String targetFile) [0x0001d] in C:\projects\diffengine\src\DiffEngine\DiffRunner.cs:131
at VerifyEngine.ProcessNew () [0x000cf] in /_/src/Verify/Verifier/VerifyEngine.cs:233
at VerifyEngine.ThrowIfRequired () [0x000cd] in /_/src/Verify/Verifier/VerifyEngine.cs:138
at VerifyTests.InnerVerifier.VerifyInner (System.Object root, System.Func`1[TResult] cleanup, System.Collections.Generic.IEnumerable`1[T] targets, System.Boolean doExpressionConversion) [0x00254] in /_/src/Verify/Verifier/InnerVerifier_Inner.cs:27
at VerifyTests.InnerVerifier.Verify (System.Object target) [0x0067d] in /_/src/Verify/Verifier/InnerVerifier_Object.cs:66
at VerifyXunit.Verifier+<>c__DisplayClass8_0.<Verify>b__0 (VerifyTests.VerifySettings verifySettings) [0x00054] in /_/src/Verify.Xunit/Verifier.cs:76
at Xunit.Sdk.TestInvoker`1+<>c__DisplayClass48_0[TTestCase].<InvokeTestMethodAsync>b__1 () [0x00154] in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:276
at Xunit.Sdk.ExecutionTimer.AggregateAsync (System.Func`1[TResult] asyncAction) [0x00031] in /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:48
at Xunit.Sdk.ExceptionAggregator.RunAsync (System.Func`1[TResult] code) [0x00025] in /_/src/xunit.core/Sdk/ExceptionAggregator.cs:90
System.Exception
Could not find empty files directory. Searched:
* /var/folders/35/trnfg6ln5032dcp6tdg545dc0000gn/T/ReSharperTestRunner_z89mcdqq/7d0cglmx/EmptyFiles
* /private/var/folders/35/trnfg6ln5032dcp6tdg545dc0000gn/T/ReSharperTestRunner_z89mcdqq/7d0cglmx/EmptyFiles
at EmptyFiles.AllFiles.FindEmptyFilesDirectory () [0x00039] in /_/src/EmptyFiles/AllFiles.cs:75
at EmptyFiles.AllFiles..cctor () [0x000a5] in /_/src/EmptyFiles/AllFiles.cs:42
Using an example from README in a test project with XUnit targeting net48
:
namespace TestProject1;
[UsesVerify]
public class Sample
{
[Fact]
public Task Test()
{
var person = ClassBeingTested.FindPerson();
return Verify(person);
}
}
public static class ClassBeingTested
{
public static Person FindPerson() =>
new()
{
Id = new("ebced679-45d3-4653-8791-3d969c4a986c"),
Title = Title.Mr,
GivenNames = "John",
FamilyName = "Smith",
};
}
public enum Title
{
Mr,
Mrs,
Miss,
Dr
}
public class Person {
public Guid Id { get; set; }
public Title Title { get; set; }
public string GivenNames { get; set; }
public string FamilyName { get; set; }
}
I am not sure what EmptyFiles
does and maybe the issue needs to be moved to the EmptyFiles
repo.
So they act the same way as tif
and jpg
the file test.cs line 110 should read
Assert.False(AllFiles.TryGetPathFor("foo.txt", out result));
AllFiles.Files
AllFiles.Archives
AllFiles.Documents
AllFiles.Images
AllFiles.Sheets
AllFiles.Slides
useful for testing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.