You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TestLogProvider seems almost functional but the formattedMessage isn't going anywhere. Why is it so and wouldn't it be nice if it was shown?
protected void Write(MvxLogLevel logLevel, string message, Exception e = null)
{
var formattedMessage = MessageFormatter(_name, logLevel, message, e);
//Console.WriteLine(formattedMessage);
}
BTW - Visual Studio 2017 15.8.9 exited several times without message after I opened the MvvmCross.sln.
Pitch
In UnitTest projects Mvx.IoCProvider.Resolve<IMvxLogProvider>() returns a TestLogProvider. Sadly this provider does a lot of what it is supposed to do but the one statement showing the log message is commented out. Testing complex code could profit from some log output.
Platforms affected (mark all that apply)
📱 iOS
🤖 Android
🏁 WPF
🌎 UWP
🍎 MacOS
📺 tvOS
🐒 Xamarin.Forms
The text was updated successfully, but these errors were encountered:
I guess it would be appropriate to have it log to xUnit ITestOutputHelper, which could be configurable through the fixture maybe. Thanks for reporting this 👍
I was looking into this yesterday. xUnit doesn't seem to allow injecting ITestOutputHelper into fixtures.
It does however allow you to use IMessageSink which will become a DiagnosticMessageSink at run-time. However, this doesn't really add anything to the output.
So I guess the better solution would be to allow you to provide your own TestLogProvider which you can control the implementation, since we can't do it from the fixture.
🏗 Enhancement Proposal
The
TestLogProvider
seems almost functional but theformattedMessage
isn't going anywhere. Why is it so and wouldn't it be nice if it was shown?BTW - Visual Studio 2017 15.8.9 exited several times without message after I opened the MvvmCross.sln.
Pitch
In UnitTest projects
Mvx.IoCProvider.Resolve<IMvxLogProvider>()
returns aTestLogProvider
. Sadly this provider does a lot of what it is supposed to do but the one statement showing the log message is commented out. Testing complex code could profit from some log output.Platforms affected (mark all that apply)
The text was updated successfully, but these errors were encountered: