Extends ApprovalTests for approval of Windows Forms through screenshot verification.
The NuGet packagehttps://nuget.org/packages/ApprovalTests.WinForms/
PM> Install-Package ApprovalTests.WinForms
WinFormsApprovals.Verify(new Form());
Usually Approval files take the form:
ClassName.MethodName.approved.extension
However, as WinForms will render differently on each OS, when approving with WinForms it will take the form
ClassName.MethodName.osname.approved.extension
It does this before each run by calling
ApprovalResults.UniqueForOs;
An Example Approval File would be:
WinFormTests.TestControlApproved.Microsoft_Windows_10_Home_N.approved.png
If you would like a different naming system you can customize the default naming.
For example, if you would like to use the the users name you could do this:
WinFormsApprovals.RegisterDefaultAdditionalInfo(ApprovalResults.UniqueForUserName);
Would yield:
"WinFormTests.DemoAlternativeMachineSpecific.ForUser.Tomas";
Read more on EnvironmentSpecificTest here
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4