seesharper / lightinject.xunit Goto Github PK
View Code? Open in Web Editor NEWLightInject.xUnit provides an integration that enables dependency injection in xUnit test methods.
LightInject.xUnit provides an integration that enables dependency injection in xUnit test methods.
I forked this repo and attempted it myself, but these lines are problematic and I'm not sure how to fix it:
https://github.com/seesharper/LightInject.xUnit/blob/master/src/LightInject.xUnit2/LightInject.xUnit2.cs#L91
https://github.com/seesharper/LightInject.xUnit/blob/master/src/LightInject.xUnit2/LightInject.xUnit2.cs#L93
https://github.com/seesharper/LightInject.xUnit/blob/master/src/LightInject.xUnit2/LightInject.xUnit2.cs#L123
https://github.com/seesharper/LightInject.xUnit/blob/master/src/LightInject.xUnit2/LightInject.xUnit2.cs#L125
Attempt to end a scope before all child scopes are completed.
Hi,
Any change you could update the project to work on .net core?
Hi, Wanted to inject ITestOutputHelper outputHelper (received in test class constructor) in order to write logs to xuint output, so I need this instance to configure my serilog logger sink.
Don't know how to do it from the static method, since it's executed before my constructor
serviceRegistry.Register<Serilog.ILogger>(factory =>
{
const string logTemplate =
"[{Timestamp:HH:mm:ss.fff%K} | {SourceContext}] | [{Level:u3}]{NewLine}{Message:lj}{NewLine}{Exception}";
var logger = new Serilog.LoggerConfiguration()
.MinimumLevel.Is(LogEventLevel.Error)
.Enrich.FromLogContext()
.WriteTo.Trace(outputTemplate: logTemplate)
.WriteTo.Console(outputTemplate: logTemplate)
.WriteTo.TestOutput(factory.GetInstance(),restrictedToMinimumLevel:LogEventLevel.Verbose, outputTemplate:logTemplate)
.CreateLogger();
return logger;
});
Hi, Is it possible to use MemberData or ClassData with InjectData attribute ?
Thanks.
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.