From 6b95193389224ada03a93b96cc883e59b70d6da0 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Wed, 18 Sep 2024 21:02:31 +1000 Subject: [PATCH] docs --- docs/mdsource/wiz/Linux_Other_Cli.source.md | 1 + .../wiz/Linux_Other_Cli_TUnit.source.md | 11 + .../Linux_Other_Cli_TUnit_AppVeyor.source.md | 93 ++++++ ...inux_Other_Cli_TUnit_AzureDevOps.source.md | 93 ++++++ ...ux_Other_Cli_TUnit_GitHubActions.source.md | 93 ++++++ .../wiz/Linux_Other_Cli_TUnit_None.source.md | 89 ++++++ docs/mdsource/wiz/Linux_Other_Gui.source.md | 1 + .../wiz/Linux_Other_Gui_TUnit.source.md | 11 + .../Linux_Other_Gui_TUnit_AppVeyor.source.md | 80 +++++ ...inux_Other_Gui_TUnit_AzureDevOps.source.md | 80 +++++ ...ux_Other_Gui_TUnit_GitHubActions.source.md | 80 +++++ .../wiz/Linux_Other_Gui_TUnit_None.source.md | 76 +++++ docs/mdsource/wiz/Linux_Rider_Cli.source.md | 1 + .../wiz/Linux_Rider_Cli_TUnit.source.md | 11 + .../Linux_Rider_Cli_TUnit_AppVeyor.source.md | 104 ++++++ ...inux_Rider_Cli_TUnit_AzureDevOps.source.md | 104 ++++++ ...ux_Rider_Cli_TUnit_GitHubActions.source.md | 104 ++++++ .../wiz/Linux_Rider_Cli_TUnit_None.source.md | 100 ++++++ docs/mdsource/wiz/Linux_Rider_Gui.source.md | 1 + .../wiz/Linux_Rider_Gui_TUnit.source.md | 11 + .../Linux_Rider_Gui_TUnit_AppVeyor.source.md | 91 ++++++ ...inux_Rider_Gui_TUnit_AzureDevOps.source.md | 91 ++++++ ...ux_Rider_Gui_TUnit_GitHubActions.source.md | 91 ++++++ .../wiz/Linux_Rider_Gui_TUnit_None.source.md | 87 +++++ docs/mdsource/wiz/MacOS_Other_Cli.source.md | 1 + .../wiz/MacOS_Other_Cli_TUnit.source.md | 11 + .../MacOS_Other_Cli_TUnit_AppVeyor.source.md | 99 ++++++ ...acOS_Other_Cli_TUnit_AzureDevOps.source.md | 99 ++++++ ...OS_Other_Cli_TUnit_GitHubActions.source.md | 99 ++++++ .../wiz/MacOS_Other_Cli_TUnit_None.source.md | 95 ++++++ docs/mdsource/wiz/MacOS_Other_Gui.source.md | 1 + .../wiz/MacOS_Other_Gui_TUnit.source.md | 11 + .../MacOS_Other_Gui_TUnit_AppVeyor.source.md | 86 +++++ ...acOS_Other_Gui_TUnit_AzureDevOps.source.md | 86 +++++ ...OS_Other_Gui_TUnit_GitHubActions.source.md | 86 +++++ .../wiz/MacOS_Other_Gui_TUnit_None.source.md | 82 +++++ docs/mdsource/wiz/MacOS_Rider_Cli.source.md | 1 + .../wiz/MacOS_Rider_Cli_TUnit.source.md | 11 + .../MacOS_Rider_Cli_TUnit_AppVeyor.source.md | 110 +++++++ ...acOS_Rider_Cli_TUnit_AzureDevOps.source.md | 110 +++++++ ...OS_Rider_Cli_TUnit_GitHubActions.source.md | 110 +++++++ .../wiz/MacOS_Rider_Cli_TUnit_None.source.md | 106 ++++++ docs/mdsource/wiz/MacOS_Rider_Gui.source.md | 1 + .../wiz/MacOS_Rider_Gui_TUnit.source.md | 11 + .../MacOS_Rider_Gui_TUnit_AppVeyor.source.md | 97 ++++++ ...acOS_Rider_Gui_TUnit_AzureDevOps.source.md | 97 ++++++ ...OS_Rider_Gui_TUnit_GitHubActions.source.md | 97 ++++++ .../wiz/MacOS_Rider_Gui_TUnit_None.source.md | 93 ++++++ docs/mdsource/wiz/Windows_Other_Cli.source.md | 1 + .../wiz/Windows_Other_Cli_TUnit.source.md | 11 + ...Windows_Other_Cli_TUnit_AppVeyor.source.md | 117 +++++++ ...dows_Other_Cli_TUnit_AzureDevOps.source.md | 117 +++++++ ...ws_Other_Cli_TUnit_GitHubActions.source.md | 117 +++++++ .../Windows_Other_Cli_TUnit_None.source.md | 113 +++++++ docs/mdsource/wiz/Windows_Other_Gui.source.md | 1 + .../wiz/Windows_Other_Gui_TUnit.source.md | 11 + ...Windows_Other_Gui_TUnit_AppVeyor.source.md | 104 ++++++ ...dows_Other_Gui_TUnit_AzureDevOps.source.md | 104 ++++++ ...ws_Other_Gui_TUnit_GitHubActions.source.md | 104 ++++++ .../Windows_Other_Gui_TUnit_None.source.md | 100 ++++++ docs/mdsource/wiz/Windows_Rider_Cli.source.md | 1 + .../wiz/Windows_Rider_Cli_TUnit.source.md | 11 + ...Windows_Rider_Cli_TUnit_AppVeyor.source.md | 128 ++++++++ ...dows_Rider_Cli_TUnit_AzureDevOps.source.md | 128 ++++++++ ...ws_Rider_Cli_TUnit_GitHubActions.source.md | 128 ++++++++ .../Windows_Rider_Cli_TUnit_None.source.md | 124 +++++++ docs/mdsource/wiz/Windows_Rider_Gui.source.md | 1 + .../wiz/Windows_Rider_Gui_TUnit.source.md | 11 + ...Windows_Rider_Gui_TUnit_AppVeyor.source.md | 115 +++++++ ...dows_Rider_Gui_TUnit_AzureDevOps.source.md | 115 +++++++ ...ws_Rider_Gui_TUnit_GitHubActions.source.md | 115 +++++++ .../Windows_Rider_Gui_TUnit_None.source.md | 111 +++++++ ...ws_VisualStudioWithReSharper_Cli.source.md | 1 + ...ualStudioWithReSharper_Cli_TUnit.source.md | 11 + ...WithReSharper_Cli_TUnit_AppVeyor.source.md | 136 ++++++++ ...hReSharper_Cli_TUnit_AzureDevOps.source.md | 136 ++++++++ ...eSharper_Cli_TUnit_GitHubActions.source.md | 136 ++++++++ ...udioWithReSharper_Cli_TUnit_None.source.md | 132 ++++++++ ...ws_VisualStudioWithReSharper_Gui.source.md | 1 + ...ualStudioWithReSharper_Gui_TUnit.source.md | 11 + ...WithReSharper_Gui_TUnit_AppVeyor.source.md | 123 +++++++ ...hReSharper_Gui_TUnit_AzureDevOps.source.md | 123 +++++++ ...eSharper_Gui_TUnit_GitHubActions.source.md | 123 +++++++ ...udioWithReSharper_Gui_TUnit_None.source.md | 119 +++++++ .../wiz/Windows_VisualStudio_Cli.source.md | 1 + .../Windows_VisualStudio_Cli_TUnit.source.md | 11 + ..._VisualStudio_Cli_TUnit_AppVeyor.source.md | 117 +++++++ ...sualStudio_Cli_TUnit_AzureDevOps.source.md | 117 +++++++ ...alStudio_Cli_TUnit_GitHubActions.source.md | 117 +++++++ ...dows_VisualStudio_Cli_TUnit_None.source.md | 113 +++++++ .../wiz/Windows_VisualStudio_Gui.source.md | 1 + .../Windows_VisualStudio_Gui_TUnit.source.md | 11 + ..._VisualStudio_Gui_TUnit_AppVeyor.source.md | 104 ++++++ ...sualStudio_Gui_TUnit_AzureDevOps.source.md | 104 ++++++ ...alStudio_Gui_TUnit_GitHubActions.source.md | 104 ++++++ ...dows_VisualStudio_Gui_TUnit_None.source.md | 100 ++++++ docs/wiz/Linux_Other_Cli.md | 1 + docs/wiz/Linux_Other_Cli_TUnit.md | 18 ++ docs/wiz/Linux_Other_Cli_TUnit_AppVeyor.md | 193 +++++++++++ docs/wiz/Linux_Other_Cli_TUnit_AzureDevOps.md | 221 +++++++++++++ .../Linux_Other_Cli_TUnit_GitHubActions.md | 197 ++++++++++++ docs/wiz/Linux_Other_Cli_TUnit_None.md | 182 +++++++++++ docs/wiz/Linux_Other_Gui.md | 1 + docs/wiz/Linux_Other_Gui_Expecto_AppVeyor.md | 2 +- .../Linux_Other_Gui_Expecto_AzureDevOps.md | 2 +- .../Linux_Other_Gui_Expecto_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_Expecto_None.md | 2 +- docs/wiz/Linux_Other_Gui_Fixie_AppVeyor.md | 2 +- docs/wiz/Linux_Other_Gui_Fixie_AzureDevOps.md | 2 +- .../Linux_Other_Gui_Fixie_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_Fixie_None.md | 2 +- docs/wiz/Linux_Other_Gui_MSTest_AppVeyor.md | 2 +- .../wiz/Linux_Other_Gui_MSTest_AzureDevOps.md | 2 +- .../Linux_Other_Gui_MSTest_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_MSTest_None.md | 2 +- docs/wiz/Linux_Other_Gui_NUnit_AppVeyor.md | 2 +- docs/wiz/Linux_Other_Gui_NUnit_AzureDevOps.md | 2 +- .../Linux_Other_Gui_NUnit_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_NUnit_None.md | 2 +- docs/wiz/Linux_Other_Gui_TUnit.md | 18 ++ docs/wiz/Linux_Other_Gui_TUnit_AppVeyor.md | 187 +++++++++++ docs/wiz/Linux_Other_Gui_TUnit_AzureDevOps.md | 215 +++++++++++++ .../Linux_Other_Gui_TUnit_GitHubActions.md | 191 +++++++++++ docs/wiz/Linux_Other_Gui_TUnit_None.md | 176 ++++++++++ docs/wiz/Linux_Other_Gui_XunitV3_AppVeyor.md | 2 +- .../Linux_Other_Gui_XunitV3_AzureDevOps.md | 2 +- .../Linux_Other_Gui_XunitV3_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_XunitV3_None.md | 2 +- docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md | 2 +- .../Linux_Other_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Linux_Other_Gui_Xunit_None.md | 2 +- docs/wiz/Linux_Rider_Cli.md | 1 + docs/wiz/Linux_Rider_Cli_TUnit.md | 18 ++ docs/wiz/Linux_Rider_Cli_TUnit_AppVeyor.md | 242 ++++++++++++++ docs/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.md | 270 ++++++++++++++++ .../Linux_Rider_Cli_TUnit_GitHubActions.md | 246 ++++++++++++++ docs/wiz/Linux_Rider_Cli_TUnit_None.md | 231 ++++++++++++++ docs/wiz/Linux_Rider_Gui.md | 1 + docs/wiz/Linux_Rider_Gui_Expecto_AppVeyor.md | 2 +- .../Linux_Rider_Gui_Expecto_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_Expecto_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_Expecto_None.md | 2 +- docs/wiz/Linux_Rider_Gui_Fixie_AppVeyor.md | 2 +- docs/wiz/Linux_Rider_Gui_Fixie_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_Fixie_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_Fixie_None.md | 2 +- docs/wiz/Linux_Rider_Gui_MSTest_AppVeyor.md | 2 +- .../wiz/Linux_Rider_Gui_MSTest_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_MSTest_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_MSTest_None.md | 2 +- docs/wiz/Linux_Rider_Gui_NUnit_AppVeyor.md | 2 +- docs/wiz/Linux_Rider_Gui_NUnit_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_NUnit_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_NUnit_None.md | 2 +- docs/wiz/Linux_Rider_Gui_TUnit.md | 18 ++ docs/wiz/Linux_Rider_Gui_TUnit_AppVeyor.md | 236 ++++++++++++++ docs/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.md | 264 +++++++++++++++ .../Linux_Rider_Gui_TUnit_GitHubActions.md | 240 ++++++++++++++ docs/wiz/Linux_Rider_Gui_TUnit_None.md | 225 +++++++++++++ docs/wiz/Linux_Rider_Gui_XunitV3_AppVeyor.md | 2 +- .../Linux_Rider_Gui_XunitV3_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_XunitV3_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_XunitV3_None.md | 2 +- docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md | 2 +- .../Linux_Rider_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Linux_Rider_Gui_Xunit_None.md | 2 +- docs/wiz/MacOS_Other_Cli.md | 1 + docs/wiz/MacOS_Other_Cli_TUnit.md | 18 ++ docs/wiz/MacOS_Other_Cli_TUnit_AppVeyor.md | 199 ++++++++++++ docs/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.md | 227 +++++++++++++ .../MacOS_Other_Cli_TUnit_GitHubActions.md | 203 ++++++++++++ docs/wiz/MacOS_Other_Cli_TUnit_None.md | 188 +++++++++++ docs/wiz/MacOS_Other_Gui.md | 1 + docs/wiz/MacOS_Other_Gui_Expecto_AppVeyor.md | 2 +- .../MacOS_Other_Gui_Expecto_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_Expecto_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_Expecto_None.md | 2 +- docs/wiz/MacOS_Other_Gui_Fixie_AppVeyor.md | 2 +- docs/wiz/MacOS_Other_Gui_Fixie_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_Fixie_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_Fixie_None.md | 2 +- docs/wiz/MacOS_Other_Gui_MSTest_AppVeyor.md | 2 +- .../wiz/MacOS_Other_Gui_MSTest_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_MSTest_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_MSTest_None.md | 2 +- docs/wiz/MacOS_Other_Gui_NUnit_AppVeyor.md | 2 +- docs/wiz/MacOS_Other_Gui_NUnit_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_NUnit_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_NUnit_None.md | 2 +- docs/wiz/MacOS_Other_Gui_TUnit.md | 18 ++ docs/wiz/MacOS_Other_Gui_TUnit_AppVeyor.md | 193 +++++++++++ docs/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.md | 221 +++++++++++++ .../MacOS_Other_Gui_TUnit_GitHubActions.md | 197 ++++++++++++ docs/wiz/MacOS_Other_Gui_TUnit_None.md | 182 +++++++++++ docs/wiz/MacOS_Other_Gui_XunitV3_AppVeyor.md | 2 +- .../MacOS_Other_Gui_XunitV3_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_XunitV3_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_XunitV3_None.md | 2 +- docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md | 2 +- .../MacOS_Other_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/MacOS_Other_Gui_Xunit_None.md | 2 +- docs/wiz/MacOS_Rider_Cli.md | 1 + docs/wiz/MacOS_Rider_Cli_TUnit.md | 18 ++ docs/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.md | 248 ++++++++++++++ docs/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.md | 276 ++++++++++++++++ .../MacOS_Rider_Cli_TUnit_GitHubActions.md | 252 +++++++++++++++ docs/wiz/MacOS_Rider_Cli_TUnit_None.md | 237 ++++++++++++++ docs/wiz/MacOS_Rider_Gui.md | 1 + docs/wiz/MacOS_Rider_Gui_Expecto_AppVeyor.md | 2 +- .../MacOS_Rider_Gui_Expecto_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_Expecto_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_Expecto_None.md | 2 +- docs/wiz/MacOS_Rider_Gui_Fixie_AppVeyor.md | 2 +- docs/wiz/MacOS_Rider_Gui_Fixie_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_Fixie_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_Fixie_None.md | 2 +- docs/wiz/MacOS_Rider_Gui_MSTest_AppVeyor.md | 2 +- .../wiz/MacOS_Rider_Gui_MSTest_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_MSTest_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_MSTest_None.md | 2 +- docs/wiz/MacOS_Rider_Gui_NUnit_AppVeyor.md | 2 +- docs/wiz/MacOS_Rider_Gui_NUnit_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_NUnit_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_NUnit_None.md | 2 +- docs/wiz/MacOS_Rider_Gui_TUnit.md | 18 ++ docs/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.md | 242 ++++++++++++++ docs/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.md | 270 ++++++++++++++++ .../MacOS_Rider_Gui_TUnit_GitHubActions.md | 246 ++++++++++++++ docs/wiz/MacOS_Rider_Gui_TUnit_None.md | 231 ++++++++++++++ docs/wiz/MacOS_Rider_Gui_XunitV3_AppVeyor.md | 2 +- .../MacOS_Rider_Gui_XunitV3_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_XunitV3_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_XunitV3_None.md | 2 +- docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md | 2 +- docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md | 2 +- .../MacOS_Rider_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/MacOS_Rider_Gui_Xunit_None.md | 2 +- docs/wiz/Windows_Other_Cli.md | 1 + docs/wiz/Windows_Other_Cli_TUnit.md | 18 ++ docs/wiz/Windows_Other_Cli_TUnit_AppVeyor.md | 217 +++++++++++++ .../Windows_Other_Cli_TUnit_AzureDevOps.md | 245 ++++++++++++++ .../Windows_Other_Cli_TUnit_GitHubActions.md | 221 +++++++++++++ docs/wiz/Windows_Other_Cli_TUnit_None.md | 206 ++++++++++++ docs/wiz/Windows_Other_Gui.md | 1 + .../wiz/Windows_Other_Gui_Expecto_AppVeyor.md | 2 +- .../Windows_Other_Gui_Expecto_AzureDevOps.md | 2 +- ...Windows_Other_Gui_Expecto_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_Expecto_None.md | 2 +- docs/wiz/Windows_Other_Gui_Fixie_AppVeyor.md | 2 +- .../Windows_Other_Gui_Fixie_AzureDevOps.md | 2 +- .../Windows_Other_Gui_Fixie_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_Fixie_None.md | 2 +- docs/wiz/Windows_Other_Gui_MSTest_AppVeyor.md | 2 +- .../Windows_Other_Gui_MSTest_AzureDevOps.md | 2 +- .../Windows_Other_Gui_MSTest_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_MSTest_None.md | 2 +- docs/wiz/Windows_Other_Gui_NUnit_AppVeyor.md | 2 +- .../Windows_Other_Gui_NUnit_AzureDevOps.md | 2 +- .../Windows_Other_Gui_NUnit_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_NUnit_None.md | 2 +- docs/wiz/Windows_Other_Gui_TUnit.md | 18 ++ docs/wiz/Windows_Other_Gui_TUnit_AppVeyor.md | 211 ++++++++++++ .../Windows_Other_Gui_TUnit_AzureDevOps.md | 239 ++++++++++++++ .../Windows_Other_Gui_TUnit_GitHubActions.md | 215 +++++++++++++ docs/wiz/Windows_Other_Gui_TUnit_None.md | 200 ++++++++++++ .../wiz/Windows_Other_Gui_XunitV3_AppVeyor.md | 2 +- .../Windows_Other_Gui_XunitV3_AzureDevOps.md | 2 +- ...Windows_Other_Gui_XunitV3_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_XunitV3_None.md | 2 +- docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md | 2 +- .../Windows_Other_Gui_Xunit_AzureDevOps.md | 2 +- .../Windows_Other_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Windows_Other_Gui_Xunit_None.md | 2 +- docs/wiz/Windows_Rider_Cli.md | 1 + docs/wiz/Windows_Rider_Cli_TUnit.md | 18 ++ docs/wiz/Windows_Rider_Cli_TUnit_AppVeyor.md | 266 +++++++++++++++ .../Windows_Rider_Cli_TUnit_AzureDevOps.md | 294 +++++++++++++++++ .../Windows_Rider_Cli_TUnit_GitHubActions.md | 270 ++++++++++++++++ docs/wiz/Windows_Rider_Cli_TUnit_None.md | 255 +++++++++++++++ docs/wiz/Windows_Rider_Gui.md | 1 + .../wiz/Windows_Rider_Gui_Expecto_AppVeyor.md | 2 +- .../Windows_Rider_Gui_Expecto_AzureDevOps.md | 2 +- ...Windows_Rider_Gui_Expecto_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_Expecto_None.md | 2 +- docs/wiz/Windows_Rider_Gui_Fixie_AppVeyor.md | 2 +- .../Windows_Rider_Gui_Fixie_AzureDevOps.md | 2 +- .../Windows_Rider_Gui_Fixie_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_Fixie_None.md | 2 +- docs/wiz/Windows_Rider_Gui_MSTest_AppVeyor.md | 2 +- .../Windows_Rider_Gui_MSTest_AzureDevOps.md | 2 +- .../Windows_Rider_Gui_MSTest_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_MSTest_None.md | 2 +- docs/wiz/Windows_Rider_Gui_NUnit_AppVeyor.md | 2 +- .../Windows_Rider_Gui_NUnit_AzureDevOps.md | 2 +- .../Windows_Rider_Gui_NUnit_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_NUnit_None.md | 2 +- docs/wiz/Windows_Rider_Gui_TUnit.md | 18 ++ docs/wiz/Windows_Rider_Gui_TUnit_AppVeyor.md | 260 +++++++++++++++ .../Windows_Rider_Gui_TUnit_AzureDevOps.md | 288 +++++++++++++++++ .../Windows_Rider_Gui_TUnit_GitHubActions.md | 264 +++++++++++++++ docs/wiz/Windows_Rider_Gui_TUnit_None.md | 249 +++++++++++++++ .../wiz/Windows_Rider_Gui_XunitV3_AppVeyor.md | 2 +- .../Windows_Rider_Gui_XunitV3_AzureDevOps.md | 2 +- ...Windows_Rider_Gui_XunitV3_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_XunitV3_None.md | 2 +- docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md | 2 +- .../Windows_Rider_Gui_Xunit_AzureDevOps.md | 2 +- .../Windows_Rider_Gui_Xunit_GitHubActions.md | 2 +- docs/wiz/Windows_Rider_Gui_Xunit_None.md | 2 +- .../Windows_VisualStudioWithReSharper_Cli.md | 1 + ...ows_VisualStudioWithReSharper_Cli_TUnit.md | 18 ++ ...lStudioWithReSharper_Cli_TUnit_AppVeyor.md | 274 ++++++++++++++++ ...udioWithReSharper_Cli_TUnit_AzureDevOps.md | 302 ++++++++++++++++++ ...ioWithReSharper_Cli_TUnit_GitHubActions.md | 278 ++++++++++++++++ ...isualStudioWithReSharper_Cli_TUnit_None.md | 263 +++++++++++++++ .../Windows_VisualStudioWithReSharper_Gui.md | 1 + ...tudioWithReSharper_Gui_Expecto_AppVeyor.md | 2 +- ...ioWithReSharper_Gui_Expecto_AzureDevOps.md | 2 +- ...WithReSharper_Gui_Expecto_GitHubActions.md | 2 +- ...ualStudioWithReSharper_Gui_Expecto_None.md | 2 +- ...lStudioWithReSharper_Gui_Fixie_AppVeyor.md | 2 +- ...udioWithReSharper_Gui_Fixie_AzureDevOps.md | 2 +- ...ioWithReSharper_Gui_Fixie_GitHubActions.md | 2 +- ...isualStudioWithReSharper_Gui_Fixie_None.md | 2 +- ...StudioWithReSharper_Gui_MSTest_AppVeyor.md | 2 +- ...dioWithReSharper_Gui_MSTest_AzureDevOps.md | 2 +- ...oWithReSharper_Gui_MSTest_GitHubActions.md | 2 +- ...sualStudioWithReSharper_Gui_MSTest_None.md | 2 +- ...lStudioWithReSharper_Gui_NUnit_AppVeyor.md | 2 +- ...udioWithReSharper_Gui_NUnit_AzureDevOps.md | 2 +- ...ioWithReSharper_Gui_NUnit_GitHubActions.md | 2 +- ...isualStudioWithReSharper_Gui_NUnit_None.md | 2 +- ...ows_VisualStudioWithReSharper_Gui_TUnit.md | 18 ++ ...lStudioWithReSharper_Gui_TUnit_AppVeyor.md | 268 ++++++++++++++++ ...udioWithReSharper_Gui_TUnit_AzureDevOps.md | 296 +++++++++++++++++ ...ioWithReSharper_Gui_TUnit_GitHubActions.md | 272 ++++++++++++++++ ...isualStudioWithReSharper_Gui_TUnit_None.md | 257 +++++++++++++++ ...tudioWithReSharper_Gui_XunitV3_AppVeyor.md | 2 +- ...ioWithReSharper_Gui_XunitV3_AzureDevOps.md | 2 +- ...WithReSharper_Gui_XunitV3_GitHubActions.md | 2 +- ...ualStudioWithReSharper_Gui_XunitV3_None.md | 2 +- ...lStudioWithReSharper_Gui_Xunit_AppVeyor.md | 2 +- ...udioWithReSharper_Gui_Xunit_AzureDevOps.md | 2 +- ...ioWithReSharper_Gui_Xunit_GitHubActions.md | 2 +- ...isualStudioWithReSharper_Gui_Xunit_None.md | 2 +- docs/wiz/Windows_VisualStudio_Cli.md | 1 + docs/wiz/Windows_VisualStudio_Cli_TUnit.md | 18 ++ ...Windows_VisualStudio_Cli_TUnit_AppVeyor.md | 217 +++++++++++++ ...dows_VisualStudio_Cli_TUnit_AzureDevOps.md | 245 ++++++++++++++ ...ws_VisualStudio_Cli_TUnit_GitHubActions.md | 221 +++++++++++++ .../Windows_VisualStudio_Cli_TUnit_None.md | 206 ++++++++++++ docs/wiz/Windows_VisualStudio_Gui.md | 1 + ...ndows_VisualStudio_Gui_Expecto_AppVeyor.md | 2 +- ...ws_VisualStudio_Gui_Expecto_AzureDevOps.md | 2 +- ..._VisualStudio_Gui_Expecto_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_Expecto_None.md | 2 +- ...Windows_VisualStudio_Gui_Fixie_AppVeyor.md | 2 +- ...dows_VisualStudio_Gui_Fixie_AzureDevOps.md | 2 +- ...ws_VisualStudio_Gui_Fixie_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_Fixie_None.md | 2 +- ...indows_VisualStudio_Gui_MSTest_AppVeyor.md | 2 +- ...ows_VisualStudio_Gui_MSTest_AzureDevOps.md | 2 +- ...s_VisualStudio_Gui_MSTest_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_MSTest_None.md | 2 +- ...Windows_VisualStudio_Gui_NUnit_AppVeyor.md | 2 +- ...dows_VisualStudio_Gui_NUnit_AzureDevOps.md | 2 +- ...ws_VisualStudio_Gui_NUnit_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_NUnit_None.md | 2 +- docs/wiz/Windows_VisualStudio_Gui_TUnit.md | 18 ++ ...Windows_VisualStudio_Gui_TUnit_AppVeyor.md | 211 ++++++++++++ ...dows_VisualStudio_Gui_TUnit_AzureDevOps.md | 239 ++++++++++++++ ...ws_VisualStudio_Gui_TUnit_GitHubActions.md | 215 +++++++++++++ .../Windows_VisualStudio_Gui_TUnit_None.md | 200 ++++++++++++ ...ndows_VisualStudio_Gui_XunitV3_AppVeyor.md | 2 +- ...ws_VisualStudio_Gui_XunitV3_AzureDevOps.md | 2 +- ..._VisualStudio_Gui_XunitV3_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_XunitV3_None.md | 2 +- ...Windows_VisualStudio_Gui_Xunit_AppVeyor.md | 2 +- ...dows_VisualStudio_Gui_Xunit_AzureDevOps.md | 2 +- ...ws_VisualStudio_Gui_Xunit_GitHubActions.md | 2 +- .../Windows_VisualStudio_Gui_Xunit_None.md | 2 +- src/Verify.Tests/Wizard/TestFramework.cs | 1 + src/Verify.Tests/Wizard/WizardGen.cs | 9 + .../ExpectoNugetUsage.fsproj | 2 +- usages/FixieNugetUsage/FixieNugetUsage.csproj | 2 +- .../MSTestNugetUsage/MSTestNugetUsage.csproj | 2 +- usages/NUnitNugetUsage/NUnitNugetUsage.csproj | 2 +- usages/NugetUsage.sln | 6 + usages/TUnitNugetUsage/TUnitNugetUsage.csproj | 12 + usages/XunitNugetUsage/XunitNugetUsage.csproj | 2 +- .../XunitV3NugetUsage.csproj | 2 +- 394 files changed, 22466 insertions(+), 198 deletions(-) create mode 100644 docs/mdsource/wiz/Linux_Other_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Linux_Other_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Linux_Rider_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/MacOS_Other_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_Other_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_Rider_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_None.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.source.md create mode 100644 docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_None.source.md create mode 100644 docs/wiz/Linux_Other_Cli_TUnit.md create mode 100644 docs/wiz/Linux_Other_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/Linux_Other_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Linux_Other_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/Linux_Other_Cli_TUnit_None.md create mode 100644 docs/wiz/Linux_Other_Gui_TUnit.md create mode 100644 docs/wiz/Linux_Other_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/Linux_Other_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Linux_Other_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/Linux_Other_Gui_TUnit_None.md create mode 100644 docs/wiz/Linux_Rider_Cli_TUnit.md create mode 100644 docs/wiz/Linux_Rider_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Linux_Rider_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/Linux_Rider_Cli_TUnit_None.md create mode 100644 docs/wiz/Linux_Rider_Gui_TUnit.md create mode 100644 docs/wiz/Linux_Rider_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Linux_Rider_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/Linux_Rider_Gui_TUnit_None.md create mode 100644 docs/wiz/MacOS_Other_Cli_TUnit.md create mode 100644 docs/wiz/MacOS_Other_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/MacOS_Other_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/MacOS_Other_Cli_TUnit_None.md create mode 100644 docs/wiz/MacOS_Other_Gui_TUnit.md create mode 100644 docs/wiz/MacOS_Other_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/MacOS_Other_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/MacOS_Other_Gui_TUnit_None.md create mode 100644 docs/wiz/MacOS_Rider_Cli_TUnit.md create mode 100644 docs/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/MacOS_Rider_Cli_TUnit_None.md create mode 100644 docs/wiz/MacOS_Rider_Gui_TUnit.md create mode 100644 docs/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/MacOS_Rider_Gui_TUnit_None.md create mode 100644 docs/wiz/Windows_Other_Cli_TUnit.md create mode 100644 docs/wiz/Windows_Other_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_Other_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_Other_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_Other_Cli_TUnit_None.md create mode 100644 docs/wiz/Windows_Other_Gui_TUnit.md create mode 100644 docs/wiz/Windows_Other_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_Other_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_Other_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_Other_Gui_TUnit_None.md create mode 100644 docs/wiz/Windows_Rider_Cli_TUnit.md create mode 100644 docs/wiz/Windows_Rider_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_Rider_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_Rider_Cli_TUnit_None.md create mode 100644 docs/wiz/Windows_Rider_Gui_TUnit.md create mode 100644 docs/wiz/Windows_Rider_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_Rider_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_Rider_Gui_TUnit_None.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.md create mode 100644 docs/wiz/Windows_VisualStudio_Cli_TUnit.md create mode 100644 docs/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_VisualStudio_Cli_TUnit_None.md create mode 100644 docs/wiz/Windows_VisualStudio_Gui_TUnit.md create mode 100644 docs/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.md create mode 100644 docs/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.md create mode 100644 docs/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.md create mode 100644 docs/wiz/Windows_VisualStudio_Gui_TUnit_None.md create mode 100644 usages/TUnitNugetUsage/TUnitNugetUsage.csproj diff --git a/docs/mdsource/wiz/Linux_Other_Cli.source.md b/docs/mdsource/wiz/Linux_Other_Cli.source.md index f3692c68c..41a0e8b94 100644 --- a/docs/mdsource/wiz/Linux_Other_Cli.source.md +++ b/docs/mdsource/wiz/Linux_Other_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Linux_Other_Cli_Xunit.md) * [XunitV3](Linux_Other_Cli_XunitV3.md) * [NUnit](Linux_Other_Cli_NUnit.md) + * [TUnit](Linux_Other_Cli_TUnit.md) * [Fixie](Linux_Other_Cli_Fixie.md) * [MSTest](Linux_Other_Cli_MSTest.md) * [Expecto](Linux_Other_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/Linux_Other_Cli_TUnit.source.md b/docs/mdsource/wiz/Linux_Other_Cli_TUnit.source.md new file mode 100644 index 000000000..d9192cfe9 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Other_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Other_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Other_Cli_TUnit_AzureDevOps.md) + * [No build server](Linux_Other_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/Linux_Other_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..2003cfcb7 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,93 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Linux_Other_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..a9a42b5b9 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,93 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Linux_Other_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..f8c152524 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,93 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Linux_Other_Cli_TUnit_None.source.md b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_None.source.md new file mode 100644 index 000000000..fc8c16c4a --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Cli_TUnit_None.source.md @@ -0,0 +1,89 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Linux_Other_Gui.source.md b/docs/mdsource/wiz/Linux_Other_Gui.source.md index 1cb70a3f7..91a69863b 100644 --- a/docs/mdsource/wiz/Linux_Other_Gui.source.md +++ b/docs/mdsource/wiz/Linux_Other_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Linux_Other_Gui_Xunit.md) * [XunitV3](Linux_Other_Gui_XunitV3.md) * [NUnit](Linux_Other_Gui_NUnit.md) + * [TUnit](Linux_Other_Gui_TUnit.md) * [Fixie](Linux_Other_Gui_Fixie.md) * [MSTest](Linux_Other_Gui_MSTest.md) * [Expecto](Linux_Other_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/Linux_Other_Gui_TUnit.source.md b/docs/mdsource/wiz/Linux_Other_Gui_TUnit.source.md new file mode 100644 index 000000000..f76703728 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Other_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Other_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Other_Gui_TUnit_AzureDevOps.md) + * [No build server](Linux_Other_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/Linux_Other_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..ae6767260 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,80 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Linux_Other_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..92f6e6c44 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,80 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Linux_Other_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..7157a629a --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,80 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Linux_Other_Gui_TUnit_None.source.md b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_None.source.md new file mode 100644 index 000000000..ea4ab7274 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Other_Gui_TUnit_None.source.md @@ -0,0 +1,76 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Linux_Rider_Cli.source.md b/docs/mdsource/wiz/Linux_Rider_Cli.source.md index 02eb853a9..4ed93a21a 100644 --- a/docs/mdsource/wiz/Linux_Rider_Cli.source.md +++ b/docs/mdsource/wiz/Linux_Rider_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Linux_Rider_Cli_Xunit.md) * [XunitV3](Linux_Rider_Cli_XunitV3.md) * [NUnit](Linux_Rider_Cli_NUnit.md) + * [TUnit](Linux_Rider_Cli_TUnit.md) * [Fixie](Linux_Rider_Cli_Fixie.md) * [MSTest](Linux_Rider_Cli_MSTest.md) * [Expecto](Linux_Rider_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/Linux_Rider_Cli_TUnit.source.md b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit.source.md new file mode 100644 index 000000000..533f13c1f --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Rider_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Rider_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Rider_Cli_TUnit_AzureDevOps.md) + * [No build server](Linux_Rider_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..4ce1c7fef --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..23f970c64 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..270047810 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_None.source.md b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_None.source.md new file mode 100644 index 000000000..fbd3395ed --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Cli_TUnit_None.source.md @@ -0,0 +1,100 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Linux_Rider_Gui.source.md b/docs/mdsource/wiz/Linux_Rider_Gui.source.md index 947121d66..88dcfdfc7 100644 --- a/docs/mdsource/wiz/Linux_Rider_Gui.source.md +++ b/docs/mdsource/wiz/Linux_Rider_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Linux_Rider_Gui_Xunit.md) * [XunitV3](Linux_Rider_Gui_XunitV3.md) * [NUnit](Linux_Rider_Gui_NUnit.md) + * [TUnit](Linux_Rider_Gui_TUnit.md) * [Fixie](Linux_Rider_Gui_Fixie.md) * [MSTest](Linux_Rider_Gui_MSTest.md) * [Expecto](Linux_Rider_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/Linux_Rider_Gui_TUnit.source.md b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit.source.md new file mode 100644 index 000000000..90b032e9f --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Rider_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Rider_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Rider_Gui_TUnit_AzureDevOps.md) + * [No build server](Linux_Rider_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..e1171f9a7 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,91 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..dcfe1866b --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,91 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..d66d71251 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,91 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_None.source.md b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_None.source.md new file mode 100644 index 000000000..a1613ef08 --- /dev/null +++ b/docs/mdsource/wiz/Linux_Rider_Gui_TUnit_None.source.md @@ -0,0 +1,87 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/MacOS_Other_Cli.source.md b/docs/mdsource/wiz/MacOS_Other_Cli.source.md index b81c7d43b..84b6e2ec1 100644 --- a/docs/mdsource/wiz/MacOS_Other_Cli.source.md +++ b/docs/mdsource/wiz/MacOS_Other_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](MacOS_Other_Cli_Xunit.md) * [XunitV3](MacOS_Other_Cli_XunitV3.md) * [NUnit](MacOS_Other_Cli_NUnit.md) + * [TUnit](MacOS_Other_Cli_TUnit.md) * [Fixie](MacOS_Other_Cli_Fixie.md) * [MSTest](MacOS_Other_Cli_MSTest.md) * [Expecto](MacOS_Other_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/MacOS_Other_Cli_TUnit.source.md b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit.source.md new file mode 100644 index 000000000..ea9b63c79 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Other_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Other_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Other_Cli_TUnit_AzureDevOps.md) + * [No build server](MacOS_Other_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..74bbd08ac --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,99 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..bb12b5669 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,99 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..e1fe65068 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,99 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_None.source.md b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_None.source.md new file mode 100644 index 000000000..68fe0637e --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Cli_TUnit_None.source.md @@ -0,0 +1,95 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/MacOS_Other_Gui.source.md b/docs/mdsource/wiz/MacOS_Other_Gui.source.md index 6f38be4e0..36c8b3d86 100644 --- a/docs/mdsource/wiz/MacOS_Other_Gui.source.md +++ b/docs/mdsource/wiz/MacOS_Other_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](MacOS_Other_Gui_Xunit.md) * [XunitV3](MacOS_Other_Gui_XunitV3.md) * [NUnit](MacOS_Other_Gui_NUnit.md) + * [TUnit](MacOS_Other_Gui_TUnit.md) * [Fixie](MacOS_Other_Gui_Fixie.md) * [MSTest](MacOS_Other_Gui_MSTest.md) * [Expecto](MacOS_Other_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/MacOS_Other_Gui_TUnit.source.md b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit.source.md new file mode 100644 index 000000000..8e4afa012 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Other_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Other_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Other_Gui_TUnit_AzureDevOps.md) + * [No build server](MacOS_Other_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..3f06a98c6 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,86 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..fd060ed8d --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,86 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..54ca2ec79 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,86 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_None.source.md b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_None.source.md new file mode 100644 index 000000000..fa54cfeb9 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Other_Gui_TUnit_None.source.md @@ -0,0 +1,82 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/MacOS_Rider_Cli.source.md b/docs/mdsource/wiz/MacOS_Rider_Cli.source.md index e8c0cfc89..7eeb590bd 100644 --- a/docs/mdsource/wiz/MacOS_Rider_Cli.source.md +++ b/docs/mdsource/wiz/MacOS_Rider_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](MacOS_Rider_Cli_Xunit.md) * [XunitV3](MacOS_Rider_Cli_XunitV3.md) * [NUnit](MacOS_Rider_Cli_NUnit.md) + * [TUnit](MacOS_Rider_Cli_TUnit.md) * [Fixie](MacOS_Rider_Cli_Fixie.md) * [MSTest](MacOS_Rider_Cli_MSTest.md) * [Expecto](MacOS_Rider_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit.source.md b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit.source.md new file mode 100644 index 000000000..c77503451 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Rider_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Rider_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Rider_Cli_TUnit_AzureDevOps.md) + * [No build server](MacOS_Rider_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..4d5f3a06b --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,110 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..f8048275c --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,110 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..ff7444f9d --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,110 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_None.source.md b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_None.source.md new file mode 100644 index 000000000..7a7658a6f --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Cli_TUnit_None.source.md @@ -0,0 +1,106 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/MacOS_Rider_Gui.source.md b/docs/mdsource/wiz/MacOS_Rider_Gui.source.md index 36ec79871..ed9daf448 100644 --- a/docs/mdsource/wiz/MacOS_Rider_Gui.source.md +++ b/docs/mdsource/wiz/MacOS_Rider_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](MacOS_Rider_Gui_Xunit.md) * [XunitV3](MacOS_Rider_Gui_XunitV3.md) * [NUnit](MacOS_Rider_Gui_NUnit.md) + * [TUnit](MacOS_Rider_Gui_TUnit.md) * [Fixie](MacOS_Rider_Gui_Fixie.md) * [MSTest](MacOS_Rider_Gui_MSTest.md) * [Expecto](MacOS_Rider_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit.source.md b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit.source.md new file mode 100644 index 000000000..6cd3e689a --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Rider_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Rider_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Rider_Gui_TUnit_AzureDevOps.md) + * [No build server](MacOS_Rider_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..421cfa09b --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,97 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..3388e5d2c --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,97 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..f11c0d033 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,97 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_None.source.md b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_None.source.md new file mode 100644 index 000000000..e7b3a6706 --- /dev/null +++ b/docs/mdsource/wiz/MacOS_Rider_Gui_TUnit_None.source.md @@ -0,0 +1,93 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_Other_Cli.source.md b/docs/mdsource/wiz/Windows_Other_Cli.source.md index a25b4a508..dd62c654a 100644 --- a/docs/mdsource/wiz/Windows_Other_Cli.source.md +++ b/docs/mdsource/wiz/Windows_Other_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_Other_Cli_Xunit.md) * [XunitV3](Windows_Other_Cli_XunitV3.md) * [NUnit](Windows_Other_Cli_NUnit.md) + * [TUnit](Windows_Other_Cli_TUnit.md) * [Fixie](Windows_Other_Cli_Fixie.md) * [MSTest](Windows_Other_Cli_MSTest.md) * [Expecto](Windows_Other_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_Other_Cli_TUnit.source.md b/docs/mdsource/wiz/Windows_Other_Cli_TUnit.source.md new file mode 100644 index 000000000..c3b8232ba --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Other_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Other_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Other_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_Other_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_Other_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..2e4b8c0ae --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,117 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_Other_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..04c580938 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,117 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_Other_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..03d242291 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,117 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_Other_Cli_TUnit_None.source.md b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_None.source.md new file mode 100644 index 000000000..b0260c58f --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Cli_TUnit_None.source.md @@ -0,0 +1,113 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_Other_Gui.source.md b/docs/mdsource/wiz/Windows_Other_Gui.source.md index 9df61bc51..74738448a 100644 --- a/docs/mdsource/wiz/Windows_Other_Gui.source.md +++ b/docs/mdsource/wiz/Windows_Other_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_Other_Gui_Xunit.md) * [XunitV3](Windows_Other_Gui_XunitV3.md) * [NUnit](Windows_Other_Gui_NUnit.md) + * [TUnit](Windows_Other_Gui_TUnit.md) * [Fixie](Windows_Other_Gui_Fixie.md) * [MSTest](Windows_Other_Gui_MSTest.md) * [Expecto](Windows_Other_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_Other_Gui_TUnit.source.md b/docs/mdsource/wiz/Windows_Other_Gui_TUnit.source.md new file mode 100644 index 000000000..473b98bbd --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Other_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Other_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Other_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_Other_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_Other_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..2e88f9085 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_Other_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..96de631ed --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_Other_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..ee7c96253 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_Other_Gui_TUnit_None.source.md b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_None.source.md new file mode 100644 index 000000000..d7f42df61 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Other_Gui_TUnit_None.source.md @@ -0,0 +1,100 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_Rider_Cli.source.md b/docs/mdsource/wiz/Windows_Rider_Cli.source.md index 080c76f15..64dfa43d0 100644 --- a/docs/mdsource/wiz/Windows_Rider_Cli.source.md +++ b/docs/mdsource/wiz/Windows_Rider_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_Rider_Cli_Xunit.md) * [XunitV3](Windows_Rider_Cli_XunitV3.md) * [NUnit](Windows_Rider_Cli_NUnit.md) + * [TUnit](Windows_Rider_Cli_TUnit.md) * [Fixie](Windows_Rider_Cli_Fixie.md) * [MSTest](Windows_Rider_Cli_MSTest.md) * [Expecto](Windows_Rider_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_Rider_Cli_TUnit.source.md b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit.source.md new file mode 100644 index 000000000..f111e4e24 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Rider_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Rider_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Rider_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_Rider_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..a8fb8b845 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,128 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..755a0de5c --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,128 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..f10a89c62 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,128 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_None.source.md b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_None.source.md new file mode 100644 index 000000000..54460fcdb --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Cli_TUnit_None.source.md @@ -0,0 +1,124 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_Rider_Gui.source.md b/docs/mdsource/wiz/Windows_Rider_Gui.source.md index 001439b9f..5f331b606 100644 --- a/docs/mdsource/wiz/Windows_Rider_Gui.source.md +++ b/docs/mdsource/wiz/Windows_Rider_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_Rider_Gui_Xunit.md) * [XunitV3](Windows_Rider_Gui_XunitV3.md) * [NUnit](Windows_Rider_Gui_NUnit.md) + * [TUnit](Windows_Rider_Gui_TUnit.md) * [Fixie](Windows_Rider_Gui_Fixie.md) * [MSTest](Windows_Rider_Gui_MSTest.md) * [Expecto](Windows_Rider_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_Rider_Gui_TUnit.source.md b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit.source.md new file mode 100644 index 000000000..49433a226 --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Rider_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Rider_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Rider_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_Rider_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..274ff4efd --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,115 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..a636cab2e --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,115 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..cd276e47d --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,115 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_None.source.md b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_None.source.md new file mode 100644 index 000000000..6ed89d41a --- /dev/null +++ b/docs/mdsource/wiz/Windows_Rider_Gui_TUnit_None.source.md @@ -0,0 +1,111 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli.source.md index d54136da1..32a394ccf 100644 --- a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli.source.md +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_VisualStudioWithReSharper_Cli_Xunit.md) * [XunitV3](Windows_VisualStudioWithReSharper_Cli_XunitV3.md) * [NUnit](Windows_VisualStudioWithReSharper_Cli_NUnit.md) + * [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) * [Fixie](Windows_VisualStudioWithReSharper_Cli_Fixie.md) * [MSTest](Windows_VisualStudioWithReSharper_Cli_MSTest.md) * [Expecto](Windows_VisualStudioWithReSharper_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.source.md new file mode 100644 index 000000000..66110d3ba --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudioWithReSharper_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..0fd3602c9 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,136 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..5b2449b80 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,136 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..bf61ae982 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,136 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.source.md new file mode 100644 index 000000000..a04fefa04 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.source.md @@ -0,0 +1,132 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui.source.md index 55683cd7f..29715860b 100644 --- a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui.source.md +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_VisualStudioWithReSharper_Gui_Xunit.md) * [XunitV3](Windows_VisualStudioWithReSharper_Gui_XunitV3.md) * [NUnit](Windows_VisualStudioWithReSharper_Gui_NUnit.md) + * [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) * [Fixie](Windows_VisualStudioWithReSharper_Gui_Fixie.md) * [MSTest](Windows_VisualStudioWithReSharper_Gui_MSTest.md) * [Expecto](Windows_VisualStudioWithReSharper_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.source.md new file mode 100644 index 000000000..3a2a9a11e --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudioWithReSharper_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..d86a3aa3e --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,123 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..704398654 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,123 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..7c20b6df5 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,123 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.source.md b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.source.md new file mode 100644 index 000000000..56b58969b --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.source.md @@ -0,0 +1,119 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +include: rider-resharper-orphaned-process + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Cli.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Cli.source.md index a9b983024..628366890 100644 --- a/docs/mdsource/wiz/Windows_VisualStudio_Cli.source.md +++ b/docs/mdsource/wiz/Windows_VisualStudio_Cli.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_VisualStudio_Cli_Xunit.md) * [XunitV3](Windows_VisualStudio_Cli_XunitV3.md) * [NUnit](Windows_VisualStudio_Cli_NUnit.md) + * [TUnit](Windows_VisualStudio_Cli_TUnit.md) * [Fixie](Windows_VisualStudio_Cli_Fixie.md) * [MSTest](Windows_VisualStudio_Cli_MSTest.md) * [Expecto](Windows_VisualStudio_Cli_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit.source.md new file mode 100644 index 000000000..583e71955 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudio_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudio_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudio_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudio_Cli_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..97fec3da6 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.source.md @@ -0,0 +1,117 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..3c69dae4a --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.source.md @@ -0,0 +1,117 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..503716541 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.source.md @@ -0,0 +1,117 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_None.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_None.source.md new file mode 100644 index 000000000..8336043f9 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Cli_TUnit_None.source.md @@ -0,0 +1,113 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Gui.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Gui.source.md index d876c65d4..b179b09eb 100644 --- a/docs/mdsource/wiz/Windows_VisualStudio_Gui.source.md +++ b/docs/mdsource/wiz/Windows_VisualStudio_Gui.source.md @@ -8,6 +8,7 @@ Options: * [Xunit](Windows_VisualStudio_Gui_Xunit.md) * [XunitV3](Windows_VisualStudio_Gui_XunitV3.md) * [NUnit](Windows_VisualStudio_Gui_NUnit.md) + * [TUnit](Windows_VisualStudio_Gui_TUnit.md) * [Fixie](Windows_VisualStudio_Gui_Fixie.md) * [MSTest](Windows_VisualStudio_Gui_MSTest.md) * [Expecto](Windows_VisualStudio_Gui_Expecto.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit.source.md new file mode 100644 index 000000000..662e6cc9c --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit.source.md @@ -0,0 +1,11 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudio_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudio_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudio_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudio_Gui_TUnit_None.md) diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.source.md new file mode 100644 index 000000000..affadb77d --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +include: build-server-appveyor + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.source.md new file mode 100644 index 000000000..2b6112d24 --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +include: build-server-azuredevops + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.source.md new file mode 100644 index 000000000..3d7d554de --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.source.md @@ -0,0 +1,104 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +include: build-server-githubactions + diff --git a/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_None.source.md b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_None.source.md new file mode 100644 index 000000000..202d9fb8e --- /dev/null +++ b/docs/mdsource/wiz/Windows_VisualStudio_Gui_TUnit_None.source.md @@ -0,0 +1,100 @@ +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + +snippet: tunit-nugets + + +## Implicit Usings + +include: implicit-usings + + +## Conventions + + +### Source Control Includes/Excludes + +include: include-exclude + + +### Text file settings + +include: text-file-settings + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + +snippet: VerifyChecksTUnit + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + +snippet: SampleTestTUnit + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Linux_Other_Cli.md b/docs/wiz/Linux_Other_Cli.md index c60fe9478..62af3c643 100644 --- a/docs/wiz/Linux_Other_Cli.md +++ b/docs/wiz/Linux_Other_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](Linux_Other_Cli_Xunit.md) * [XunitV3](Linux_Other_Cli_XunitV3.md) * [NUnit](Linux_Other_Cli_NUnit.md) + * [TUnit](Linux_Other_Cli_TUnit.md) * [Fixie](Linux_Other_Cli_Fixie.md) * [MSTest](Linux_Other_Cli_MSTest.md) * [Expecto](Linux_Other_Cli_Expecto.md) diff --git a/docs/wiz/Linux_Other_Cli_TUnit.md b/docs/wiz/Linux_Other_Cli_TUnit.md new file mode 100644 index 000000000..e86486e09 --- /dev/null +++ b/docs/wiz/Linux_Other_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Other_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Other_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Other_Cli_TUnit_AzureDevOps.md) + * [No build server](Linux_Other_Cli_TUnit_None.md) diff --git a/docs/wiz/Linux_Other_Cli_TUnit_AppVeyor.md b/docs/wiz/Linux_Other_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..e46067a01 --- /dev/null +++ b/docs/wiz/Linux_Other_Cli_TUnit_AppVeyor.md @@ -0,0 +1,193 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Linux_Other_Cli_TUnit_AzureDevOps.md b/docs/wiz/Linux_Other_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..6fc9af060 --- /dev/null +++ b/docs/wiz/Linux_Other_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,221 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Linux_Other_Cli_TUnit_GitHubActions.md b/docs/wiz/Linux_Other_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..aacd44c06 --- /dev/null +++ b/docs/wiz/Linux_Other_Cli_TUnit_GitHubActions.md @@ -0,0 +1,197 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Linux_Other_Cli_TUnit_None.md b/docs/wiz/Linux_Other_Cli_TUnit_None.md new file mode 100644 index 000000000..984976d4a --- /dev/null +++ b/docs/wiz/Linux_Other_Cli_TUnit_None.md @@ -0,0 +1,182 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer CLI](Linux_Other_Cli.md) > [TUnit](Linux_Other_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Linux_Other_Gui.md b/docs/wiz/Linux_Other_Gui.md index 1b9d8eed2..83d1c0c68 100644 --- a/docs/wiz/Linux_Other_Gui.md +++ b/docs/wiz/Linux_Other_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](Linux_Other_Gui_Xunit.md) * [XunitV3](Linux_Other_Gui_XunitV3.md) * [NUnit](Linux_Other_Gui_NUnit.md) + * [TUnit](Linux_Other_Gui_TUnit.md) * [Fixie](Linux_Other_Gui_Fixie.md) * [MSTest](Linux_Other_Gui_MSTest.md) * [Expecto](Linux_Other_Gui_Expecto.md) diff --git a/docs/wiz/Linux_Other_Gui_Expecto_AppVeyor.md b/docs/wiz/Linux_Other_Gui_Expecto_AppVeyor.md index 9cdc4deab..cd859cc4e 100644 --- a/docs/wiz/Linux_Other_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Expecto_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_Expecto_AzureDevOps.md index 4284cc05e..30b8ffd6c 100644 --- a/docs/wiz/Linux_Other_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Expecto_GitHubActions.md b/docs/wiz/Linux_Other_Gui_Expecto_GitHubActions.md index aa567ffe4..a6fbfa4c9 100644 --- a/docs/wiz/Linux_Other_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Expecto_None.md b/docs/wiz/Linux_Other_Gui_Expecto_None.md index dff302df7..4701837f8 100644 --- a/docs/wiz/Linux_Other_Gui_Expecto_None.md +++ b/docs/wiz/Linux_Other_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Fixie_AppVeyor.md b/docs/wiz/Linux_Other_Gui_Fixie_AppVeyor.md index 5a9f28193..d97a8c9e8 100644 --- a/docs/wiz/Linux_Other_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Fixie_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_Fixie_AzureDevOps.md index 6bc33555c..f9dc28587 100644 --- a/docs/wiz/Linux_Other_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Fixie_GitHubActions.md b/docs/wiz/Linux_Other_Gui_Fixie_GitHubActions.md index 25b040116..4755bc6f1 100644 --- a/docs/wiz/Linux_Other_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_Fixie_None.md b/docs/wiz/Linux_Other_Gui_Fixie_None.md index aa704d372..e098358e2 100644 --- a/docs/wiz/Linux_Other_Gui_Fixie_None.md +++ b/docs/wiz/Linux_Other_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_MSTest_AppVeyor.md b/docs/wiz/Linux_Other_Gui_MSTest_AppVeyor.md index dedf1d1f1..2a7aa5454 100644 --- a/docs/wiz/Linux_Other_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_MSTest_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_MSTest_AzureDevOps.md index 4963999c6..cabbe8666 100644 --- a/docs/wiz/Linux_Other_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_MSTest_GitHubActions.md b/docs/wiz/Linux_Other_Gui_MSTest_GitHubActions.md index 244b3e8bd..5aec90830 100644 --- a/docs/wiz/Linux_Other_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_MSTest_None.md b/docs/wiz/Linux_Other_Gui_MSTest_None.md index ff16bd5c1..8c6ae7154 100644 --- a/docs/wiz/Linux_Other_Gui_MSTest_None.md +++ b/docs/wiz/Linux_Other_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_NUnit_AppVeyor.md b/docs/wiz/Linux_Other_Gui_NUnit_AppVeyor.md index 7acd168ba..5b7f65324 100644 --- a/docs/wiz/Linux_Other_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_NUnit_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_NUnit_AzureDevOps.md index 5bb8e6e9f..de76a7e75 100644 --- a/docs/wiz/Linux_Other_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_NUnit_GitHubActions.md b/docs/wiz/Linux_Other_Gui_NUnit_GitHubActions.md index 9be3d5cb5..8a9106fdd 100644 --- a/docs/wiz/Linux_Other_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_NUnit_None.md b/docs/wiz/Linux_Other_Gui_NUnit_None.md index 3b4a75f3b..087417672 100644 --- a/docs/wiz/Linux_Other_Gui_NUnit_None.md +++ b/docs/wiz/Linux_Other_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Other_Gui_TUnit.md b/docs/wiz/Linux_Other_Gui_TUnit.md new file mode 100644 index 000000000..bfb8b06b2 --- /dev/null +++ b/docs/wiz/Linux_Other_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Other_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Other_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Other_Gui_TUnit_AzureDevOps.md) + * [No build server](Linux_Other_Gui_TUnit_None.md) diff --git a/docs/wiz/Linux_Other_Gui_TUnit_AppVeyor.md b/docs/wiz/Linux_Other_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..46b04e21c --- /dev/null +++ b/docs/wiz/Linux_Other_Gui_TUnit_AppVeyor.md @@ -0,0 +1,187 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Linux_Other_Gui_TUnit_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..c37c8cc0e --- /dev/null +++ b/docs/wiz/Linux_Other_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,215 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Linux_Other_Gui_TUnit_GitHubActions.md b/docs/wiz/Linux_Other_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..4fa8fe3f1 --- /dev/null +++ b/docs/wiz/Linux_Other_Gui_TUnit_GitHubActions.md @@ -0,0 +1,191 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Linux_Other_Gui_TUnit_None.md b/docs/wiz/Linux_Other_Gui_TUnit_None.md new file mode 100644 index 000000000..cd2b5e557 --- /dev/null +++ b/docs/wiz/Linux_Other_Gui_TUnit_None.md @@ -0,0 +1,176 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [Other](Linux_Other.md) > [Prefer GUI](Linux_Other_Gui.md) > [TUnit](Linux_Other_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Linux_Other_Gui_XunitV3_AppVeyor.md b/docs/wiz/Linux_Other_Gui_XunitV3_AppVeyor.md index 880f2ed73..3e8681dfb 100644 --- a/docs/wiz/Linux_Other_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_XunitV3_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_XunitV3_AzureDevOps.md index 802e49d75..8ba791614 100644 --- a/docs/wiz/Linux_Other_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_XunitV3_GitHubActions.md b/docs/wiz/Linux_Other_Gui_XunitV3_GitHubActions.md index c0dda7446..208c67b30 100644 --- a/docs/wiz/Linux_Other_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_XunitV3_None.md b/docs/wiz/Linux_Other_Gui_XunitV3_None.md index 32331b4e6..58853ee95 100644 --- a/docs/wiz/Linux_Other_Gui_XunitV3_None.md +++ b/docs/wiz/Linux_Other_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md b/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md index 98938493c..f4945d1a3 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md b/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md index 319e41105..8905103ab 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md b/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md index d3308040c..acfef910b 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Other_Gui_Xunit_None.md b/docs/wiz/Linux_Other_Gui_Xunit_None.md index d5ed3bc56..5df6384ee 100644 --- a/docs/wiz/Linux_Other_Gui_Xunit_None.md +++ b/docs/wiz/Linux_Other_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Cli.md b/docs/wiz/Linux_Rider_Cli.md index efafa235a..9946a564c 100644 --- a/docs/wiz/Linux_Rider_Cli.md +++ b/docs/wiz/Linux_Rider_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](Linux_Rider_Cli_Xunit.md) * [XunitV3](Linux_Rider_Cli_XunitV3.md) * [NUnit](Linux_Rider_Cli_NUnit.md) + * [TUnit](Linux_Rider_Cli_TUnit.md) * [Fixie](Linux_Rider_Cli_Fixie.md) * [MSTest](Linux_Rider_Cli_MSTest.md) * [Expecto](Linux_Rider_Cli_Expecto.md) diff --git a/docs/wiz/Linux_Rider_Cli_TUnit.md b/docs/wiz/Linux_Rider_Cli_TUnit.md new file mode 100644 index 000000000..15719fa25 --- /dev/null +++ b/docs/wiz/Linux_Rider_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Rider_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Rider_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Rider_Cli_TUnit_AzureDevOps.md) + * [No build server](Linux_Rider_Cli_TUnit_None.md) diff --git a/docs/wiz/Linux_Rider_Cli_TUnit_AppVeyor.md b/docs/wiz/Linux_Rider_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..6abfcac89 --- /dev/null +++ b/docs/wiz/Linux_Rider_Cli_TUnit_AppVeyor.md @@ -0,0 +1,242 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.md b/docs/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..f6c7dbbb4 --- /dev/null +++ b/docs/wiz/Linux_Rider_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,270 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Linux_Rider_Cli_TUnit_GitHubActions.md b/docs/wiz/Linux_Rider_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..3edda8bea --- /dev/null +++ b/docs/wiz/Linux_Rider_Cli_TUnit_GitHubActions.md @@ -0,0 +1,246 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Linux_Rider_Cli_TUnit_None.md b/docs/wiz/Linux_Rider_Cli_TUnit_None.md new file mode 100644 index 000000000..15b06e03a --- /dev/null +++ b/docs/wiz/Linux_Rider_Cli_TUnit_None.md @@ -0,0 +1,231 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer CLI](Linux_Rider_Cli.md) > [TUnit](Linux_Rider_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Linux_Rider_Gui.md b/docs/wiz/Linux_Rider_Gui.md index 9ad8c38e3..9e7b763e7 100644 --- a/docs/wiz/Linux_Rider_Gui.md +++ b/docs/wiz/Linux_Rider_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](Linux_Rider_Gui_Xunit.md) * [XunitV3](Linux_Rider_Gui_XunitV3.md) * [NUnit](Linux_Rider_Gui_NUnit.md) + * [TUnit](Linux_Rider_Gui_TUnit.md) * [Fixie](Linux_Rider_Gui_Fixie.md) * [MSTest](Linux_Rider_Gui_MSTest.md) * [Expecto](Linux_Rider_Gui_Expecto.md) diff --git a/docs/wiz/Linux_Rider_Gui_Expecto_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_Expecto_AppVeyor.md index ce794fcd0..8d182a87e 100644 --- a/docs/wiz/Linux_Rider_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Expecto_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_Expecto_AzureDevOps.md index c3cbcf12c..28aef4acf 100644 --- a/docs/wiz/Linux_Rider_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Expecto_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_Expecto_GitHubActions.md index 9307938cd..eaa79c598 100644 --- a/docs/wiz/Linux_Rider_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Expecto_None.md b/docs/wiz/Linux_Rider_Gui_Expecto_None.md index 2236a7dba..1ecea93ee 100644 --- a/docs/wiz/Linux_Rider_Gui_Expecto_None.md +++ b/docs/wiz/Linux_Rider_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Fixie_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_Fixie_AppVeyor.md index 401457207..dea30ae7f 100644 --- a/docs/wiz/Linux_Rider_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Fixie_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_Fixie_AzureDevOps.md index 0d0b793aa..c8f5c7f92 100644 --- a/docs/wiz/Linux_Rider_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Fixie_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_Fixie_GitHubActions.md index 21ddca421..d5db2b9ef 100644 --- a/docs/wiz/Linux_Rider_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_Fixie_None.md b/docs/wiz/Linux_Rider_Gui_Fixie_None.md index 8e3690561..d2c6f63b7 100644 --- a/docs/wiz/Linux_Rider_Gui_Fixie_None.md +++ b/docs/wiz/Linux_Rider_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_MSTest_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_MSTest_AppVeyor.md index 926ca7ad1..29b6277d4 100644 --- a/docs/wiz/Linux_Rider_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_MSTest_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_MSTest_AzureDevOps.md index 8adb17a0b..954fb2eda 100644 --- a/docs/wiz/Linux_Rider_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_MSTest_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_MSTest_GitHubActions.md index 5ac97c683..b1829be9a 100644 --- a/docs/wiz/Linux_Rider_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_MSTest_None.md b/docs/wiz/Linux_Rider_Gui_MSTest_None.md index 4b5a12df6..d1fd8b3e6 100644 --- a/docs/wiz/Linux_Rider_Gui_MSTest_None.md +++ b/docs/wiz/Linux_Rider_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_NUnit_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_NUnit_AppVeyor.md index 5e6ac0b1d..d8b9c9475 100644 --- a/docs/wiz/Linux_Rider_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_NUnit_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_NUnit_AzureDevOps.md index 31df3ad01..aa3d9888b 100644 --- a/docs/wiz/Linux_Rider_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_NUnit_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_NUnit_GitHubActions.md index d1ae3c0b0..6177edd18 100644 --- a/docs/wiz/Linux_Rider_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_NUnit_None.md b/docs/wiz/Linux_Rider_Gui_NUnit_None.md index c21451888..2337ca30a 100644 --- a/docs/wiz/Linux_Rider_Gui_NUnit_None.md +++ b/docs/wiz/Linux_Rider_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Linux_Rider_Gui_TUnit.md b/docs/wiz/Linux_Rider_Gui_TUnit.md new file mode 100644 index 000000000..b041dba7a --- /dev/null +++ b/docs/wiz/Linux_Rider_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Linux_Rider_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Linux_Rider_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Linux_Rider_Gui_TUnit_AzureDevOps.md) + * [No build server](Linux_Rider_Gui_TUnit_None.md) diff --git a/docs/wiz/Linux_Rider_Gui_TUnit_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..13a05d386 --- /dev/null +++ b/docs/wiz/Linux_Rider_Gui_TUnit_AppVeyor.md @@ -0,0 +1,236 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..87f0d44f7 --- /dev/null +++ b/docs/wiz/Linux_Rider_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,264 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Linux_Rider_Gui_TUnit_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..b99e4a14b --- /dev/null +++ b/docs/wiz/Linux_Rider_Gui_TUnit_GitHubActions.md @@ -0,0 +1,240 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Linux_Rider_Gui_TUnit_None.md b/docs/wiz/Linux_Rider_Gui_TUnit_None.md new file mode 100644 index 000000000..50003a6c4 --- /dev/null +++ b/docs/wiz/Linux_Rider_Gui_TUnit_None.md @@ -0,0 +1,225 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Linux](Linux.md) > [JetBrains Rider](Linux_Rider.md) > [Prefer GUI](Linux_Rider_Gui.md) > [TUnit](Linux_Rider_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Linux: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Rider](https://www.jetbrains.com/rider/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Linux_Rider_Gui_XunitV3_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_XunitV3_AppVeyor.md index e581a96c6..68f22dc2d 100644 --- a/docs/wiz/Linux_Rider_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_XunitV3_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_XunitV3_AzureDevOps.md index 63e3ad457..6da435049 100644 --- a/docs/wiz/Linux_Rider_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_XunitV3_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_XunitV3_GitHubActions.md index 545b9c67a..785d483e8 100644 --- a/docs/wiz/Linux_Rider_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_XunitV3_None.md b/docs/wiz/Linux_Rider_Gui_XunitV3_None.md index 09cb991d6..66ca815ae 100644 --- a/docs/wiz/Linux_Rider_Gui_XunitV3_None.md +++ b/docs/wiz/Linux_Rider_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md b/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md index af1a28ef3..e916cb491 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md b/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md index 1a23c19d6..614e258af 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md b/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md index cec3c9428..21e044f53 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Linux_Rider_Gui_Xunit_None.md b/docs/wiz/Linux_Rider_Gui_Xunit_None.md index 07468225d..7d37ca139 100644 --- a/docs/wiz/Linux_Rider_Gui_Xunit_None.md +++ b/docs/wiz/Linux_Rider_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Cli.md b/docs/wiz/MacOS_Other_Cli.md index aba8467b0..4563996c5 100644 --- a/docs/wiz/MacOS_Other_Cli.md +++ b/docs/wiz/MacOS_Other_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](MacOS_Other_Cli_Xunit.md) * [XunitV3](MacOS_Other_Cli_XunitV3.md) * [NUnit](MacOS_Other_Cli_NUnit.md) + * [TUnit](MacOS_Other_Cli_TUnit.md) * [Fixie](MacOS_Other_Cli_Fixie.md) * [MSTest](MacOS_Other_Cli_MSTest.md) * [Expecto](MacOS_Other_Cli_Expecto.md) diff --git a/docs/wiz/MacOS_Other_Cli_TUnit.md b/docs/wiz/MacOS_Other_Cli_TUnit.md new file mode 100644 index 000000000..2ddba7c3b --- /dev/null +++ b/docs/wiz/MacOS_Other_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Other_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Other_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Other_Cli_TUnit_AzureDevOps.md) + * [No build server](MacOS_Other_Cli_TUnit_None.md) diff --git a/docs/wiz/MacOS_Other_Cli_TUnit_AppVeyor.md b/docs/wiz/MacOS_Other_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..770e0a100 --- /dev/null +++ b/docs/wiz/MacOS_Other_Cli_TUnit_AppVeyor.md @@ -0,0 +1,199 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.md b/docs/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..223a54e44 --- /dev/null +++ b/docs/wiz/MacOS_Other_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,227 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/MacOS_Other_Cli_TUnit_GitHubActions.md b/docs/wiz/MacOS_Other_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..28a40922f --- /dev/null +++ b/docs/wiz/MacOS_Other_Cli_TUnit_GitHubActions.md @@ -0,0 +1,203 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/MacOS_Other_Cli_TUnit_None.md b/docs/wiz/MacOS_Other_Cli_TUnit_None.md new file mode 100644 index 000000000..04f2e090a --- /dev/null +++ b/docs/wiz/MacOS_Other_Cli_TUnit_None.md @@ -0,0 +1,188 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer CLI](MacOS_Other_Cli.md) > [TUnit](MacOS_Other_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/MacOS_Other_Gui.md b/docs/wiz/MacOS_Other_Gui.md index bb24c3eed..4706f3681 100644 --- a/docs/wiz/MacOS_Other_Gui.md +++ b/docs/wiz/MacOS_Other_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](MacOS_Other_Gui_Xunit.md) * [XunitV3](MacOS_Other_Gui_XunitV3.md) * [NUnit](MacOS_Other_Gui_NUnit.md) + * [TUnit](MacOS_Other_Gui_TUnit.md) * [Fixie](MacOS_Other_Gui_Fixie.md) * [MSTest](MacOS_Other_Gui_MSTest.md) * [Expecto](MacOS_Other_Gui_Expecto.md) diff --git a/docs/wiz/MacOS_Other_Gui_Expecto_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_Expecto_AppVeyor.md index ff7fe8137..78baedd23 100644 --- a/docs/wiz/MacOS_Other_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Expecto_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_Expecto_AzureDevOps.md index a48d66a26..dbe263a1d 100644 --- a/docs/wiz/MacOS_Other_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Expecto_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_Expecto_GitHubActions.md index c6954b88a..ba388a434 100644 --- a/docs/wiz/MacOS_Other_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Expecto_None.md b/docs/wiz/MacOS_Other_Gui_Expecto_None.md index e0580f759..d09197b91 100644 --- a/docs/wiz/MacOS_Other_Gui_Expecto_None.md +++ b/docs/wiz/MacOS_Other_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Fixie_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_Fixie_AppVeyor.md index 94444ad51..7de9b2c6b 100644 --- a/docs/wiz/MacOS_Other_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Fixie_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_Fixie_AzureDevOps.md index 5172d0033..74121b942 100644 --- a/docs/wiz/MacOS_Other_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Fixie_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_Fixie_GitHubActions.md index 1db6991b8..f1955e0df 100644 --- a/docs/wiz/MacOS_Other_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_Fixie_None.md b/docs/wiz/MacOS_Other_Gui_Fixie_None.md index 3ce624a09..365a0c4c6 100644 --- a/docs/wiz/MacOS_Other_Gui_Fixie_None.md +++ b/docs/wiz/MacOS_Other_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_MSTest_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_MSTest_AppVeyor.md index 4bf1931de..8544739e4 100644 --- a/docs/wiz/MacOS_Other_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_MSTest_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_MSTest_AzureDevOps.md index 51831120e..83f3825b7 100644 --- a/docs/wiz/MacOS_Other_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_MSTest_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_MSTest_GitHubActions.md index 3530731ea..4fadeca6a 100644 --- a/docs/wiz/MacOS_Other_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_MSTest_None.md b/docs/wiz/MacOS_Other_Gui_MSTest_None.md index e3e10715b..738987fa7 100644 --- a/docs/wiz/MacOS_Other_Gui_MSTest_None.md +++ b/docs/wiz/MacOS_Other_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_NUnit_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_NUnit_AppVeyor.md index 2856a248f..454df9be3 100644 --- a/docs/wiz/MacOS_Other_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_NUnit_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_NUnit_AzureDevOps.md index 7be931776..939119fd3 100644 --- a/docs/wiz/MacOS_Other_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_NUnit_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_NUnit_GitHubActions.md index 3ced13c70..fdcd07f03 100644 --- a/docs/wiz/MacOS_Other_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_NUnit_None.md b/docs/wiz/MacOS_Other_Gui_NUnit_None.md index 7c4b6218f..5cd7fc6b2 100644 --- a/docs/wiz/MacOS_Other_Gui_NUnit_None.md +++ b/docs/wiz/MacOS_Other_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Other_Gui_TUnit.md b/docs/wiz/MacOS_Other_Gui_TUnit.md new file mode 100644 index 000000000..910202ec8 --- /dev/null +++ b/docs/wiz/MacOS_Other_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Other_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Other_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Other_Gui_TUnit_AzureDevOps.md) + * [No build server](MacOS_Other_Gui_TUnit_None.md) diff --git a/docs/wiz/MacOS_Other_Gui_TUnit_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..6938cee13 --- /dev/null +++ b/docs/wiz/MacOS_Other_Gui_TUnit_AppVeyor.md @@ -0,0 +1,193 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..5e2c0f8df --- /dev/null +++ b/docs/wiz/MacOS_Other_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,221 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/MacOS_Other_Gui_TUnit_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..9ac466420 --- /dev/null +++ b/docs/wiz/MacOS_Other_Gui_TUnit_GitHubActions.md @@ -0,0 +1,197 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/MacOS_Other_Gui_TUnit_None.md b/docs/wiz/MacOS_Other_Gui_TUnit_None.md new file mode 100644 index 000000000..ffbb884ae --- /dev/null +++ b/docs/wiz/MacOS_Other_Gui_TUnit_None.md @@ -0,0 +1,182 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [Other](MacOS_Other.md) > [Prefer GUI](MacOS_Other_Gui.md) > [TUnit](MacOS_Other_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/MacOS_Other_Gui_XunitV3_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_XunitV3_AppVeyor.md index 3e21f0fd0..7c00cdccf 100644 --- a/docs/wiz/MacOS_Other_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_XunitV3_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_XunitV3_AzureDevOps.md index 96e8fbed3..0b82f20b1 100644 --- a/docs/wiz/MacOS_Other_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_XunitV3_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_XunitV3_GitHubActions.md index 98b5ce2ad..0f7a7b9ab 100644 --- a/docs/wiz/MacOS_Other_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_XunitV3_None.md b/docs/wiz/MacOS_Other_Gui_XunitV3_None.md index 80067a7ad..ae40f5d44 100644 --- a/docs/wiz/MacOS_Other_Gui_XunitV3_None.md +++ b/docs/wiz/MacOS_Other_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md b/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md index cae1ccea0..5592dae1b 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md b/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md index 0da4637c6..c37f5292d 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md b/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md index 89165254a..d6c8230fa 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Other_Gui_Xunit_None.md b/docs/wiz/MacOS_Other_Gui_Xunit_None.md index 4d5921e0d..4ca67e773 100644 --- a/docs/wiz/MacOS_Other_Gui_Xunit_None.md +++ b/docs/wiz/MacOS_Other_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Cli.md b/docs/wiz/MacOS_Rider_Cli.md index 83808129f..7416d4bd9 100644 --- a/docs/wiz/MacOS_Rider_Cli.md +++ b/docs/wiz/MacOS_Rider_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](MacOS_Rider_Cli_Xunit.md) * [XunitV3](MacOS_Rider_Cli_XunitV3.md) * [NUnit](MacOS_Rider_Cli_NUnit.md) + * [TUnit](MacOS_Rider_Cli_TUnit.md) * [Fixie](MacOS_Rider_Cli_Fixie.md) * [MSTest](MacOS_Rider_Cli_MSTest.md) * [Expecto](MacOS_Rider_Cli_Expecto.md) diff --git a/docs/wiz/MacOS_Rider_Cli_TUnit.md b/docs/wiz/MacOS_Rider_Cli_TUnit.md new file mode 100644 index 000000000..367b954e6 --- /dev/null +++ b/docs/wiz/MacOS_Rider_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Rider_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Rider_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Rider_Cli_TUnit_AzureDevOps.md) + * [No build server](MacOS_Rider_Cli_TUnit_None.md) diff --git a/docs/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.md b/docs/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..19f4a8cab --- /dev/null +++ b/docs/wiz/MacOS_Rider_Cli_TUnit_AppVeyor.md @@ -0,0 +1,248 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.md b/docs/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..b57991f68 --- /dev/null +++ b/docs/wiz/MacOS_Rider_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,276 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.md b/docs/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..e4d40f9fa --- /dev/null +++ b/docs/wiz/MacOS_Rider_Cli_TUnit_GitHubActions.md @@ -0,0 +1,252 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/MacOS_Rider_Cli_TUnit_None.md b/docs/wiz/MacOS_Rider_Cli_TUnit_None.md new file mode 100644 index 000000000..18b18dc6e --- /dev/null +++ b/docs/wiz/MacOS_Rider_Cli_TUnit_None.md @@ -0,0 +1,237 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer CLI](MacOS_Rider_Cli.md) > [TUnit](MacOS_Rider_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/MacOS_Rider_Gui.md b/docs/wiz/MacOS_Rider_Gui.md index f937ac156..fc75de84a 100644 --- a/docs/wiz/MacOS_Rider_Gui.md +++ b/docs/wiz/MacOS_Rider_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](MacOS_Rider_Gui_Xunit.md) * [XunitV3](MacOS_Rider_Gui_XunitV3.md) * [NUnit](MacOS_Rider_Gui_NUnit.md) + * [TUnit](MacOS_Rider_Gui_TUnit.md) * [Fixie](MacOS_Rider_Gui_Fixie.md) * [MSTest](MacOS_Rider_Gui_MSTest.md) * [Expecto](MacOS_Rider_Gui_Expecto.md) diff --git a/docs/wiz/MacOS_Rider_Gui_Expecto_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_Expecto_AppVeyor.md index 3d39b653f..8fe5879df 100644 --- a/docs/wiz/MacOS_Rider_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Expecto_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_Expecto_AzureDevOps.md index 5f370cf3d..9383a53a6 100644 --- a/docs/wiz/MacOS_Rider_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Expecto_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_Expecto_GitHubActions.md index 485508a1c..f00f48a11 100644 --- a/docs/wiz/MacOS_Rider_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Expecto_None.md b/docs/wiz/MacOS_Rider_Gui_Expecto_None.md index 9d6e0efe3..4dd741d18 100644 --- a/docs/wiz/MacOS_Rider_Gui_Expecto_None.md +++ b/docs/wiz/MacOS_Rider_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Fixie_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_Fixie_AppVeyor.md index bec9d44ed..9e0e4338f 100644 --- a/docs/wiz/MacOS_Rider_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Fixie_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_Fixie_AzureDevOps.md index 5e8bb183e..037252c17 100644 --- a/docs/wiz/MacOS_Rider_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Fixie_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_Fixie_GitHubActions.md index 33766402a..5a1f153fa 100644 --- a/docs/wiz/MacOS_Rider_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_Fixie_None.md b/docs/wiz/MacOS_Rider_Gui_Fixie_None.md index 825ec04c6..6682c5c40 100644 --- a/docs/wiz/MacOS_Rider_Gui_Fixie_None.md +++ b/docs/wiz/MacOS_Rider_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_MSTest_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_MSTest_AppVeyor.md index 104daf725..9b97bf105 100644 --- a/docs/wiz/MacOS_Rider_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_MSTest_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_MSTest_AzureDevOps.md index 816100caa..774af00ab 100644 --- a/docs/wiz/MacOS_Rider_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_MSTest_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_MSTest_GitHubActions.md index 07c1c3d47..e983253cc 100644 --- a/docs/wiz/MacOS_Rider_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_MSTest_None.md b/docs/wiz/MacOS_Rider_Gui_MSTest_None.md index 847e47af2..2c8440598 100644 --- a/docs/wiz/MacOS_Rider_Gui_MSTest_None.md +++ b/docs/wiz/MacOS_Rider_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_NUnit_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_NUnit_AppVeyor.md index bbf3fcdff..d4ccf8f43 100644 --- a/docs/wiz/MacOS_Rider_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_NUnit_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_NUnit_AzureDevOps.md index ac8f0ba94..146efc377 100644 --- a/docs/wiz/MacOS_Rider_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_NUnit_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_NUnit_GitHubActions.md index 25e5b14a7..fbdda15bb 100644 --- a/docs/wiz/MacOS_Rider_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_NUnit_None.md b/docs/wiz/MacOS_Rider_Gui_NUnit_None.md index 4205714ab..9381ed618 100644 --- a/docs/wiz/MacOS_Rider_Gui_NUnit_None.md +++ b/docs/wiz/MacOS_Rider_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/MacOS_Rider_Gui_TUnit.md b/docs/wiz/MacOS_Rider_Gui_TUnit.md new file mode 100644 index 000000000..5adecdc2f --- /dev/null +++ b/docs/wiz/MacOS_Rider_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](MacOS_Rider_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](MacOS_Rider_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](MacOS_Rider_Gui_TUnit_AzureDevOps.md) + * [No build server](MacOS_Rider_Gui_TUnit_None.md) diff --git a/docs/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..b60ce6424 --- /dev/null +++ b/docs/wiz/MacOS_Rider_Gui_TUnit_AppVeyor.md @@ -0,0 +1,242 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..c6cefe264 --- /dev/null +++ b/docs/wiz/MacOS_Rider_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,270 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..3b9c8027b --- /dev/null +++ b/docs/wiz/MacOS_Rider_Gui_TUnit_GitHubActions.md @@ -0,0 +1,246 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/MacOS_Rider_Gui_TUnit_None.md b/docs/wiz/MacOS_Rider_Gui_TUnit_None.md new file mode 100644 index 000000000..132349e04 --- /dev/null +++ b/docs/wiz/MacOS_Rider_Gui_TUnit_None.md @@ -0,0 +1,231 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [MacOS](MacOS.md) > [JetBrains Rider](MacOS_Rider.md) > [Prefer GUI](MacOS_Rider_Gui.md) > [TUnit](MacOS_Rider_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by MacOS: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [Kaleidoscope](https://kaleidoscope.app) + * [DeltaWalker](https://www.deltawalker.com/) + * [KDiff3](https://github.com/KDE/kdiff3) + * [TkDiff](https://sourceforge.net/projects/tkdiff/) + * [Guiffy](https://www.guiffy.com/) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/MacOS_Rider_Gui_XunitV3_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_XunitV3_AppVeyor.md index 0b483eec6..7837f2cbd 100644 --- a/docs/wiz/MacOS_Rider_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_XunitV3_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_XunitV3_AzureDevOps.md index 28a5d1080..ef381746c 100644 --- a/docs/wiz/MacOS_Rider_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_XunitV3_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_XunitV3_GitHubActions.md index d6a5940b8..71908e91d 100644 --- a/docs/wiz/MacOS_Rider_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_XunitV3_None.md b/docs/wiz/MacOS_Rider_Gui_XunitV3_None.md index 637f31cb0..1eccc0a53 100644 --- a/docs/wiz/MacOS_Rider_Gui_XunitV3_None.md +++ b/docs/wiz/MacOS_Rider_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md b/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md index 9b41976f2..8f1062624 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md b/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md index 09758eb0b..12ce814c0 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md b/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md index f719d9876..dda79b4f7 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/MacOS_Rider_Gui_Xunit_None.md b/docs/wiz/MacOS_Rider_Gui_Xunit_None.md index efca2b3eb..cea8a4f1c 100644 --- a/docs/wiz/MacOS_Rider_Gui_Xunit_None.md +++ b/docs/wiz/MacOS_Rider_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Cli.md b/docs/wiz/Windows_Other_Cli.md index 76d08cc4d..c48a0459b 100644 --- a/docs/wiz/Windows_Other_Cli.md +++ b/docs/wiz/Windows_Other_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_Other_Cli_Xunit.md) * [XunitV3](Windows_Other_Cli_XunitV3.md) * [NUnit](Windows_Other_Cli_NUnit.md) + * [TUnit](Windows_Other_Cli_TUnit.md) * [Fixie](Windows_Other_Cli_Fixie.md) * [MSTest](Windows_Other_Cli_MSTest.md) * [Expecto](Windows_Other_Cli_Expecto.md) diff --git a/docs/wiz/Windows_Other_Cli_TUnit.md b/docs/wiz/Windows_Other_Cli_TUnit.md new file mode 100644 index 000000000..898d7afa1 --- /dev/null +++ b/docs/wiz/Windows_Other_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Other_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Other_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Other_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_Other_Cli_TUnit_None.md) diff --git a/docs/wiz/Windows_Other_Cli_TUnit_AppVeyor.md b/docs/wiz/Windows_Other_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..eccaef59b --- /dev/null +++ b/docs/wiz/Windows_Other_Cli_TUnit_AppVeyor.md @@ -0,0 +1,217 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_Other_Cli_TUnit_AzureDevOps.md b/docs/wiz/Windows_Other_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..696d62203 --- /dev/null +++ b/docs/wiz/Windows_Other_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,245 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_Other_Cli_TUnit_GitHubActions.md b/docs/wiz/Windows_Other_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..8f5573110 --- /dev/null +++ b/docs/wiz/Windows_Other_Cli_TUnit_GitHubActions.md @@ -0,0 +1,221 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_Other_Cli_TUnit_None.md b/docs/wiz/Windows_Other_Cli_TUnit_None.md new file mode 100644 index 000000000..1ca5668d0 --- /dev/null +++ b/docs/wiz/Windows_Other_Cli_TUnit_None.md @@ -0,0 +1,206 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer CLI](Windows_Other_Cli.md) > [TUnit](Windows_Other_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_Other_Gui.md b/docs/wiz/Windows_Other_Gui.md index 1e63c7147..71ca9199f 100644 --- a/docs/wiz/Windows_Other_Gui.md +++ b/docs/wiz/Windows_Other_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_Other_Gui_Xunit.md) * [XunitV3](Windows_Other_Gui_XunitV3.md) * [NUnit](Windows_Other_Gui_NUnit.md) + * [TUnit](Windows_Other_Gui_TUnit.md) * [Fixie](Windows_Other_Gui_Fixie.md) * [MSTest](Windows_Other_Gui_MSTest.md) * [Expecto](Windows_Other_Gui_Expecto.md) diff --git a/docs/wiz/Windows_Other_Gui_Expecto_AppVeyor.md b/docs/wiz/Windows_Other_Gui_Expecto_AppVeyor.md index 704ca5004..62782e00f 100644 --- a/docs/wiz/Windows_Other_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Expecto_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_Expecto_AzureDevOps.md index a34c08a4a..9fdf97a33 100644 --- a/docs/wiz/Windows_Other_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Expecto_GitHubActions.md b/docs/wiz/Windows_Other_Gui_Expecto_GitHubActions.md index 49261a791..ce3b74f68 100644 --- a/docs/wiz/Windows_Other_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Expecto_None.md b/docs/wiz/Windows_Other_Gui_Expecto_None.md index bea5664f4..df79b46ee 100644 --- a/docs/wiz/Windows_Other_Gui_Expecto_None.md +++ b/docs/wiz/Windows_Other_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Fixie_AppVeyor.md b/docs/wiz/Windows_Other_Gui_Fixie_AppVeyor.md index a35a6a2ab..63ac51933 100644 --- a/docs/wiz/Windows_Other_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Fixie_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_Fixie_AzureDevOps.md index 893c7c92c..3b7405196 100644 --- a/docs/wiz/Windows_Other_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Fixie_GitHubActions.md b/docs/wiz/Windows_Other_Gui_Fixie_GitHubActions.md index c918cbfdd..d87168553 100644 --- a/docs/wiz/Windows_Other_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_Fixie_None.md b/docs/wiz/Windows_Other_Gui_Fixie_None.md index 0cc2d0e6a..c2dc35e64 100644 --- a/docs/wiz/Windows_Other_Gui_Fixie_None.md +++ b/docs/wiz/Windows_Other_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_MSTest_AppVeyor.md b/docs/wiz/Windows_Other_Gui_MSTest_AppVeyor.md index 07f8998e2..9ddc60c45 100644 --- a/docs/wiz/Windows_Other_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_MSTest_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_MSTest_AzureDevOps.md index 6c185fa80..71ef11491 100644 --- a/docs/wiz/Windows_Other_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_MSTest_GitHubActions.md b/docs/wiz/Windows_Other_Gui_MSTest_GitHubActions.md index b2e21a5a2..66a38f25b 100644 --- a/docs/wiz/Windows_Other_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_MSTest_None.md b/docs/wiz/Windows_Other_Gui_MSTest_None.md index 10f9c3c22..bfd492f19 100644 --- a/docs/wiz/Windows_Other_Gui_MSTest_None.md +++ b/docs/wiz/Windows_Other_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_NUnit_AppVeyor.md b/docs/wiz/Windows_Other_Gui_NUnit_AppVeyor.md index 9881a0531..519e2896f 100644 --- a/docs/wiz/Windows_Other_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_NUnit_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_NUnit_AzureDevOps.md index d6b9bb4ea..04f4cc705 100644 --- a/docs/wiz/Windows_Other_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_NUnit_GitHubActions.md b/docs/wiz/Windows_Other_Gui_NUnit_GitHubActions.md index ac2522376..0cc8adf53 100644 --- a/docs/wiz/Windows_Other_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_NUnit_None.md b/docs/wiz/Windows_Other_Gui_NUnit_None.md index 5fe8627ea..7104488c3 100644 --- a/docs/wiz/Windows_Other_Gui_NUnit_None.md +++ b/docs/wiz/Windows_Other_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Other_Gui_TUnit.md b/docs/wiz/Windows_Other_Gui_TUnit.md new file mode 100644 index 000000000..1e3295409 --- /dev/null +++ b/docs/wiz/Windows_Other_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Other_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Other_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Other_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_Other_Gui_TUnit_None.md) diff --git a/docs/wiz/Windows_Other_Gui_TUnit_AppVeyor.md b/docs/wiz/Windows_Other_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..6e9fe3caf --- /dev/null +++ b/docs/wiz/Windows_Other_Gui_TUnit_AppVeyor.md @@ -0,0 +1,211 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_Other_Gui_TUnit_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..aa1cd74c6 --- /dev/null +++ b/docs/wiz/Windows_Other_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,239 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_Other_Gui_TUnit_GitHubActions.md b/docs/wiz/Windows_Other_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..0f8fcfbaf --- /dev/null +++ b/docs/wiz/Windows_Other_Gui_TUnit_GitHubActions.md @@ -0,0 +1,215 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_Other_Gui_TUnit_None.md b/docs/wiz/Windows_Other_Gui_TUnit_None.md new file mode 100644 index 000000000..a78c1f1ff --- /dev/null +++ b/docs/wiz/Windows_Other_Gui_TUnit_None.md @@ -0,0 +1,200 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Other](Windows_Other.md) > [Prefer GUI](Windows_Other_Gui.md) > [TUnit](Windows_Other_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_Other_Gui_XunitV3_AppVeyor.md b/docs/wiz/Windows_Other_Gui_XunitV3_AppVeyor.md index 978089752..0b1b8034f 100644 --- a/docs/wiz/Windows_Other_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_XunitV3_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_XunitV3_AzureDevOps.md index 95265a6a2..979b8739f 100644 --- a/docs/wiz/Windows_Other_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_XunitV3_GitHubActions.md b/docs/wiz/Windows_Other_Gui_XunitV3_GitHubActions.md index e1203d87d..f7bb5604b 100644 --- a/docs/wiz/Windows_Other_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_XunitV3_None.md b/docs/wiz/Windows_Other_Gui_XunitV3_None.md index f903d37ab..f0850ec52 100644 --- a/docs/wiz/Windows_Other_Gui_XunitV3_None.md +++ b/docs/wiz/Windows_Other_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md index 71d608e0a..5f35e0b38 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md index d52c35247..d9d062ae0 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md index 841d00275..3b2facf8e 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Other_Gui_Xunit_None.md b/docs/wiz/Windows_Other_Gui_Xunit_None.md index 123072453..2a37c8570 100644 --- a/docs/wiz/Windows_Other_Gui_Xunit_None.md +++ b/docs/wiz/Windows_Other_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Cli.md b/docs/wiz/Windows_Rider_Cli.md index d4290876c..6730a07f0 100644 --- a/docs/wiz/Windows_Rider_Cli.md +++ b/docs/wiz/Windows_Rider_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_Rider_Cli_Xunit.md) * [XunitV3](Windows_Rider_Cli_XunitV3.md) * [NUnit](Windows_Rider_Cli_NUnit.md) + * [TUnit](Windows_Rider_Cli_TUnit.md) * [Fixie](Windows_Rider_Cli_Fixie.md) * [MSTest](Windows_Rider_Cli_MSTest.md) * [Expecto](Windows_Rider_Cli_Expecto.md) diff --git a/docs/wiz/Windows_Rider_Cli_TUnit.md b/docs/wiz/Windows_Rider_Cli_TUnit.md new file mode 100644 index 000000000..cd090d654 --- /dev/null +++ b/docs/wiz/Windows_Rider_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Rider_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Rider_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Rider_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_Rider_Cli_TUnit_None.md) diff --git a/docs/wiz/Windows_Rider_Cli_TUnit_AppVeyor.md b/docs/wiz/Windows_Rider_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..08840c8e5 --- /dev/null +++ b/docs/wiz/Windows_Rider_Cli_TUnit_AppVeyor.md @@ -0,0 +1,266 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.md b/docs/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..7327e3e68 --- /dev/null +++ b/docs/wiz/Windows_Rider_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,294 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_Rider_Cli_TUnit_GitHubActions.md b/docs/wiz/Windows_Rider_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..1b0df2244 --- /dev/null +++ b/docs/wiz/Windows_Rider_Cli_TUnit_GitHubActions.md @@ -0,0 +1,270 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_Rider_Cli_TUnit_None.md b/docs/wiz/Windows_Rider_Cli_TUnit_None.md new file mode 100644 index 000000000..da917245c --- /dev/null +++ b/docs/wiz/Windows_Rider_Cli_TUnit_None.md @@ -0,0 +1,255 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer CLI](Windows_Rider_Cli.md) > [TUnit](Windows_Rider_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_Rider_Gui.md b/docs/wiz/Windows_Rider_Gui.md index 2ac04ebbd..116575e06 100644 --- a/docs/wiz/Windows_Rider_Gui.md +++ b/docs/wiz/Windows_Rider_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_Rider_Gui_Xunit.md) * [XunitV3](Windows_Rider_Gui_XunitV3.md) * [NUnit](Windows_Rider_Gui_NUnit.md) + * [TUnit](Windows_Rider_Gui_TUnit.md) * [Fixie](Windows_Rider_Gui_Fixie.md) * [MSTest](Windows_Rider_Gui_MSTest.md) * [Expecto](Windows_Rider_Gui_Expecto.md) diff --git a/docs/wiz/Windows_Rider_Gui_Expecto_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_Expecto_AppVeyor.md index 1abf7992e..81a2aa322 100644 --- a/docs/wiz/Windows_Rider_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Expecto_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_Expecto_AzureDevOps.md index 1a18c44d7..c26a43732 100644 --- a/docs/wiz/Windows_Rider_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Expecto_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_Expecto_GitHubActions.md index 358fb34ed..b2c283fb8 100644 --- a/docs/wiz/Windows_Rider_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Expecto_None.md b/docs/wiz/Windows_Rider_Gui_Expecto_None.md index b8d3f7f9a..cfa4ef80f 100644 --- a/docs/wiz/Windows_Rider_Gui_Expecto_None.md +++ b/docs/wiz/Windows_Rider_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Fixie_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_Fixie_AppVeyor.md index b42d8b746..3fa05a4b0 100644 --- a/docs/wiz/Windows_Rider_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Fixie_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_Fixie_AzureDevOps.md index 208759d5e..799a99a3c 100644 --- a/docs/wiz/Windows_Rider_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Fixie_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_Fixie_GitHubActions.md index 053641875..e6dbbf4f8 100644 --- a/docs/wiz/Windows_Rider_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_Fixie_None.md b/docs/wiz/Windows_Rider_Gui_Fixie_None.md index dacb2723e..d11cb9623 100644 --- a/docs/wiz/Windows_Rider_Gui_Fixie_None.md +++ b/docs/wiz/Windows_Rider_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_MSTest_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_MSTest_AppVeyor.md index d97debb40..e41382f89 100644 --- a/docs/wiz/Windows_Rider_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_MSTest_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_MSTest_AzureDevOps.md index 0b7f1b6be..ae6a787aa 100644 --- a/docs/wiz/Windows_Rider_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_MSTest_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_MSTest_GitHubActions.md index 672e0877e..4f9c820fc 100644 --- a/docs/wiz/Windows_Rider_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_MSTest_None.md b/docs/wiz/Windows_Rider_Gui_MSTest_None.md index f3a4143a2..8bccc45aa 100644 --- a/docs/wiz/Windows_Rider_Gui_MSTest_None.md +++ b/docs/wiz/Windows_Rider_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_NUnit_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_NUnit_AppVeyor.md index 6bbfc4365..f82ab828a 100644 --- a/docs/wiz/Windows_Rider_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_NUnit_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_NUnit_AzureDevOps.md index aaee0824e..8fef5275d 100644 --- a/docs/wiz/Windows_Rider_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_NUnit_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_NUnit_GitHubActions.md index 7596096cf..1bccdaee4 100644 --- a/docs/wiz/Windows_Rider_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_NUnit_None.md b/docs/wiz/Windows_Rider_Gui_NUnit_None.md index 0e411f91b..b63be3e5d 100644 --- a/docs/wiz/Windows_Rider_Gui_NUnit_None.md +++ b/docs/wiz/Windows_Rider_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_Rider_Gui_TUnit.md b/docs/wiz/Windows_Rider_Gui_TUnit.md new file mode 100644 index 000000000..874dd5dc4 --- /dev/null +++ b/docs/wiz/Windows_Rider_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_Rider_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_Rider_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_Rider_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_Rider_Gui_TUnit_None.md) diff --git a/docs/wiz/Windows_Rider_Gui_TUnit_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..33589b800 --- /dev/null +++ b/docs/wiz/Windows_Rider_Gui_TUnit_AppVeyor.md @@ -0,0 +1,260 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..01cea064c --- /dev/null +++ b/docs/wiz/Windows_Rider_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,288 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_Rider_Gui_TUnit_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..6bd78285d --- /dev/null +++ b/docs/wiz/Windows_Rider_Gui_TUnit_GitHubActions.md @@ -0,0 +1,264 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_Rider_Gui_TUnit_None.md b/docs/wiz/Windows_Rider_Gui_TUnit_None.md new file mode 100644 index 000000000..4c9f6642a --- /dev/null +++ b/docs/wiz/Windows_Rider_Gui_TUnit_None.md @@ -0,0 +1,249 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [JetBrains Rider](Windows_Rider.md) > [Prefer GUI](Windows_Rider_Gui.md) > [TUnit](Windows_Rider_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## Rider Plugin + +Install the [Rider Plugin](https://plugins.jetbrains.com/plugin/17240-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the Rider test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_Rider_Gui_XunitV3_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_XunitV3_AppVeyor.md index ce1971496..baea5909a 100644 --- a/docs/wiz/Windows_Rider_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_XunitV3_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_XunitV3_AzureDevOps.md index 11808c52f..d99be81dc 100644 --- a/docs/wiz/Windows_Rider_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_XunitV3_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_XunitV3_GitHubActions.md index 9e1689c75..796436905 100644 --- a/docs/wiz/Windows_Rider_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_XunitV3_None.md b/docs/wiz/Windows_Rider_Gui_XunitV3_None.md index e876291cf..ab1d91a84 100644 --- a/docs/wiz/Windows_Rider_Gui_XunitV3_None.md +++ b/docs/wiz/Windows_Rider_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md index 80bea5f87..6f87bf15e 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md index 082eb36ae..502e8e015 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md index 57f2ea2ee..c21af1fbc 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_Rider_Gui_Xunit_None.md b/docs/wiz/Windows_Rider_Gui_Xunit_None.md index 4f0d80a74..5db1518ca 100644 --- a/docs/wiz/Windows_Rider_Gui_Xunit_None.md +++ b/docs/wiz/Windows_Rider_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli.md index 0b0ebd037..822885029 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Cli.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_VisualStudioWithReSharper_Cli_Xunit.md) * [XunitV3](Windows_VisualStudioWithReSharper_Cli_XunitV3.md) * [NUnit](Windows_VisualStudioWithReSharper_Cli_NUnit.md) + * [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) * [Fixie](Windows_VisualStudioWithReSharper_Cli_Fixie.md) * [MSTest](Windows_VisualStudioWithReSharper_Cli_MSTest.md) * [Expecto](Windows_VisualStudioWithReSharper_Cli_Expecto.md) diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.md new file mode 100644 index 000000000..6d2acd4c8 --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudioWithReSharper_Cli_TUnit_None.md) diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..519c17acd --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AppVeyor.md @@ -0,0 +1,274 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..047bf461f --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,302 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..374a6c303 --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_GitHubActions.md @@ -0,0 +1,278 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.md new file mode 100644 index 000000000..03f94611d --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Cli_TUnit_None.md @@ -0,0 +1,263 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer CLI](Windows_VisualStudioWithReSharper_Cli.md) > [TUnit](Windows_VisualStudioWithReSharper_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui.md index 884374492..37cab8677 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_VisualStudioWithReSharper_Gui_Xunit.md) * [XunitV3](Windows_VisualStudioWithReSharper_Gui_XunitV3.md) * [NUnit](Windows_VisualStudioWithReSharper_Gui_NUnit.md) + * [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) * [Fixie](Windows_VisualStudioWithReSharper_Gui_Fixie.md) * [MSTest](Windows_VisualStudioWithReSharper_Gui_MSTest.md) * [Expecto](Windows_VisualStudioWithReSharper_Gui_Expecto.md) diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AppVeyor.md index b8a5c7ef2..d2e3a2c5e 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AzureDevOps.md index 2291e809f..d0bca142a 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_GitHubActions.md index 6cffe9b20..25bc6f480 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_None.md index 3180f08a8..efd631bcb 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AppVeyor.md index 2942f8097..6e570a62c 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AzureDevOps.md index 79214f76c..d14918bde 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_GitHubActions.md index d66d4d713..add397c42 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_None.md index f270db1b9..e050f0967 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AppVeyor.md index 55b64299e..48bee37a0 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AzureDevOps.md index 709b050e4..ec6ef6d80 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_GitHubActions.md index 5487c22eb..0712afb2f 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_None.md index cebb10c8f..8523272a6 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AppVeyor.md index 21ad3f7cd..eb53d971a 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AzureDevOps.md index d45a282b3..310696063 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_GitHubActions.md index b50a3edba..e975f1792 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_None.md index b78282b4c..215ee3a61 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.md new file mode 100644 index 000000000..4ef20dcad --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudioWithReSharper_Gui_TUnit_None.md) diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..85449ae84 --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AppVeyor.md @@ -0,0 +1,268 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..1f82f1119 --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,296 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..b6e0c2112 --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_GitHubActions.md @@ -0,0 +1,272 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.md new file mode 100644 index 000000000..dba106507 --- /dev/null +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_TUnit_None.md @@ -0,0 +1,257 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio with ReSharper](Windows_VisualStudioWithReSharper.md) > [Prefer GUI](Windows_VisualStudioWithReSharper_Gui.md) > [TUnit](Windows_VisualStudioWithReSharper_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + + +## ReSharper + + +### Orphaned process detection + +[Disable orphaned process detection](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#disable-orphaned-process-detection). + + +## Verify Plugin + +Install the [ReSharper Plugin](https://plugins.jetbrains.com/plugin/17241-verify-support) + +Provides a mechanism for contextually accepting or rejecting snapshot changes inside the ReSharper test runner. + +This is optional, but recommended. + +## Disable orphaned process detection + +Resharper and Rider have a feature [Check for orphaned processes spawned by test runner](https://www.jetbrains.com/help/resharper/Reference__Options__Tools__Unit_Testing__Test_Runner.html). + +> By default, a list of all processes that are launched by the executed tests. If some of theses processes do not exit after the test execution is over, ReSharper will suggest you to terminate the process. If your setup requires some processes started by the tests to continue running, you can clear this checkbox to avoid unnecessary notifications. + +Since this project launches diff tools, it will trigger this feature and a dialog will show: + +> All unit tests are finished, but child processes spawned by the test runner process are still running. Terminate child process? + +R# terminate process dialog + +As such this feature needs to be disabled: + + +### Disable for solution + +Add the following to `[Solution].sln.DotSettings`. + +``` +DoNothing +``` + + +### Disable for machine + + +#### Resharper + +ReSharper | Options | Tools | Unit Testing | Test Runner + +Disable R# orphaned processes detection + + +#### Rider + +File | Settings | Manage Layers | This computer | Edit Layer | Build, Execution, Deployment | Unit Testing | Test Runner + +Disable R# orphaned processes detection + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AppVeyor.md index d9f72aab8..a5888bef0 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AzureDevOps.md index 59b8fc1b4..5f159ca9e 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_GitHubActions.md index e5289ef48..78fc48969 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_None.md index 2e6a1202a..014eed5f8 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md index 5040f25c9..92e66eec7 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md index e9587c25c..573858308 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md index 7491869c3..7ada2862c 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md index 222acd779..686eef706 100644 --- a/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md +++ b/docs/wiz/Windows_VisualStudioWithReSharper_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Cli.md b/docs/wiz/Windows_VisualStudio_Cli.md index 3532e7bf6..969006d34 100644 --- a/docs/wiz/Windows_VisualStudio_Cli.md +++ b/docs/wiz/Windows_VisualStudio_Cli.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_VisualStudio_Cli_Xunit.md) * [XunitV3](Windows_VisualStudio_Cli_XunitV3.md) * [NUnit](Windows_VisualStudio_Cli_NUnit.md) + * [TUnit](Windows_VisualStudio_Cli_TUnit.md) * [Fixie](Windows_VisualStudio_Cli_Fixie.md) * [MSTest](Windows_VisualStudio_Cli_MSTest.md) * [Expecto](Windows_VisualStudio_Cli_Expecto.md) diff --git a/docs/wiz/Windows_VisualStudio_Cli_TUnit.md b/docs/wiz/Windows_VisualStudio_Cli_TUnit.md new file mode 100644 index 000000000..b77c80228 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Cli_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudio_Cli_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudio_Cli_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudio_Cli_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudio_Cli_TUnit_None.md) diff --git a/docs/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.md new file mode 100644 index 000000000..bf1a96c02 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Cli_TUnit_AppVeyor.md @@ -0,0 +1,217 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.md new file mode 100644 index 000000000..227766757 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Cli_TUnit_AzureDevOps.md @@ -0,0 +1,245 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.md new file mode 100644 index 000000000..ade3334e0 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Cli_TUnit_GitHubActions.md @@ -0,0 +1,221 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_VisualStudio_Cli_TUnit_None.md b/docs/wiz/Windows_VisualStudio_Cli_TUnit_None.md new file mode 100644 index 000000000..c7fb3c932 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Cli_TUnit_None.md @@ -0,0 +1,206 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer CLI](Windows_VisualStudio_Cli.md) > [TUnit](Windows_VisualStudio_Cli_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + +``` +dotnet add package TUnit +dotnet add package Verify.TUnit +``` + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +``` +dotnet add package Verify.DiffPlex +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + +## Verify.Terminal + +[Verify.Terminal](https://github.com/VerifyTests/Verify.Terminal) is a dotnet tool for managing snapshots from the command line. + +This is optional. + +### Install the tool + +``` +dotnet tool install -g verify.tool +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_VisualStudio_Gui.md b/docs/wiz/Windows_VisualStudio_Gui.md index 729525fd4..4faacd58d 100644 --- a/docs/wiz/Windows_VisualStudio_Gui.md +++ b/docs/wiz/Windows_VisualStudio_Gui.md @@ -15,6 +15,7 @@ Options: * [Xunit](Windows_VisualStudio_Gui_Xunit.md) * [XunitV3](Windows_VisualStudio_Gui_XunitV3.md) * [NUnit](Windows_VisualStudio_Gui_NUnit.md) + * [TUnit](Windows_VisualStudio_Gui_TUnit.md) * [Fixie](Windows_VisualStudio_Gui_Fixie.md) * [MSTest](Windows_VisualStudio_Gui_MSTest.md) * [Expecto](Windows_VisualStudio_Gui_Expecto.md) diff --git a/docs/wiz/Windows_VisualStudio_Gui_Expecto_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_Expecto_AppVeyor.md index ff2407857..90d87bc71 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Expecto_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Expecto_AppVeyor.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Expecto_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_Expecto_AzureDevOps.md index 439c47b48..184820693 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Expecto_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Expecto_AzureDevOps.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Expecto_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_Expecto_GitHubActions.md index c0469d18e..b1d1c6c0b 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Expecto_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Expecto_GitHubActions.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Expecto_None.md b/docs/wiz/Windows_VisualStudio_Gui_Expecto_None.md index 2946d7ee3..a2b818732 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Expecto_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Expecto_None.md @@ -20,7 +20,7 @@ Add the following packages to the test project: - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Fixie_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_Fixie_AppVeyor.md index 3608c08d3..e82780770 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Fixie_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Fixie_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Fixie_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_Fixie_AzureDevOps.md index e9d6a079b..b89d2f6ec 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Fixie_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Fixie_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Fixie_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_Fixie_GitHubActions.md index a75bbdb43..b6ac6d25c 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Fixie_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Fixie_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_Fixie_None.md b/docs/wiz/Windows_VisualStudio_Gui_Fixie_None.md index c66072691..a52ee7d70 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Fixie_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Fixie_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_MSTest_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_MSTest_AppVeyor.md index 82b6c7d0c..50aaae06b 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_MSTest_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_MSTest_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_MSTest_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_MSTest_AzureDevOps.md index 205cc7ab4..49a7b23c5 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_MSTest_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_MSTest_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_MSTest_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_MSTest_GitHubActions.md index 840647042..65ea59420 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_MSTest_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_MSTest_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_MSTest_None.md b/docs/wiz/Windows_VisualStudio_Gui_MSTest_None.md index deafa92be..8a19d951d 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_MSTest_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_MSTest_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_NUnit_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_NUnit_AppVeyor.md index 4f988c5b0..a26d06a1f 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_NUnit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_NUnit_AppVeyor.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_NUnit_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_NUnit_AzureDevOps.md index 81aff2847..123e5ef21 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_NUnit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_NUnit_AzureDevOps.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_NUnit_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_NUnit_GitHubActions.md index 7ed667329..397a7baae 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_NUnit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_NUnit_GitHubActions.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_NUnit_None.md b/docs/wiz/Windows_VisualStudio_Gui_NUnit_None.md index b61750b7f..a4653850e 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_NUnit_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_NUnit_None.md @@ -19,7 +19,7 @@ Add the following packages to the test project: ```csproj - + ``` snippet source | anchor diff --git a/docs/wiz/Windows_VisualStudio_Gui_TUnit.md b/docs/wiz/Windows_VisualStudio_Gui_TUnit.md new file mode 100644 index 000000000..35c541ddf --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Gui_TUnit.md @@ -0,0 +1,18 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) + +## Select Build Server + +Options: + * [AppVeyor](Windows_VisualStudio_Gui_TUnit_AppVeyor.md) + * [GitHub Actions](Windows_VisualStudio_Gui_TUnit_GitHubActions.md) + * [Azure DevOps](Windows_VisualStudio_Gui_TUnit_AzureDevOps.md) + * [No build server](Windows_VisualStudio_Gui_TUnit_None.md) diff --git a/docs/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.md new file mode 100644 index 000000000..70068f1f8 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Gui_TUnit_AppVeyor.md @@ -0,0 +1,211 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > AppVeyor + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on AppVeyor + +Use a [on_failure build step](https://www.appveyor.com/docs/build-configuration/#build-pipeline) to call [Push-AppveyorArtifact](https://www.appveyor.com/docs/build-worker-api/#push-artifact). + +``` +on_failure: + - ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } +``` + +See also [Pushing artifacts from scripts](https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts). + diff --git a/docs/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.md new file mode 100644 index 000000000..f51c08e9a --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Gui_TUnit_AzureDevOps.md @@ -0,0 +1,239 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > Azure DevOps + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on Azure DevOps + +Directly after the test runner step add a build step to set a flag if the testrunner failed. This is done by using a [failed condition](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml). This flag will be evaluated in the CopyFiles and PublishBuildArtifacts steps below. + +```yaml +- task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo ##vso[task.setvariable variable=publishverify]Yes' +``` + +Since the PublishBuildArtifacts step in DevOps does not allow a wildcard it is necessary to stage the 'received' files before publishing: + +```yaml +- task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true +``` + +Publish the staged files as a build artifact: + +```yaml +- task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Verify' + publishLocation: 'Container' +``` + + diff --git a/docs/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.md new file mode 100644 index 000000000..d62e22816 --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Gui_TUnit_GitHubActions.md @@ -0,0 +1,215 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > GitHub Actions + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + +## Getting .received in output on GitHub Actions + +Use a [if: failure()](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#failure) condition to upload any `*.received.*` files if the build fails. + +```yaml +- name: Upload Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: verify-test-results + path: | + **/*.received.* +``` + + diff --git a/docs/wiz/Windows_VisualStudio_Gui_TUnit_None.md b/docs/wiz/Windows_VisualStudio_Gui_TUnit_None.md new file mode 100644 index 000000000..e442a3e5d --- /dev/null +++ b/docs/wiz/Windows_VisualStudio_Gui_TUnit_None.md @@ -0,0 +1,200 @@ + + +# Getting Started Wizard + +[Home](/docs/wiz/readme.md) > [Windows](Windows.md) > [Visual Studio](Windows_VisualStudio.md) > [Prefer GUI](Windows_VisualStudio_Gui.md) > [TUnit](Windows_VisualStudio_Gui_TUnit.md) > No build server + +## Add NuGet packages + +Add the following packages to the test project: + + + + +```csproj + + +``` +snippet source | anchor + + + +## Implicit Usings + +**All examples use [Implicit Usings](https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#implicitusings). Ensure `` is set to `enable` to ensure examples compile correctly.** + +``` +enable +``` + +If `ImplicitUsings` are not enabled, substitute usages of `Verify()` with `Verifier.Verify()`. + + +## Conventions + + +### Source Control Includes/Excludes + + * **All `*.received.*` files should be excluded from source control.** + +eg. add the following to `.gitignore` + +``` +*.received.* +``` + +If using [UseSplitModeForUniqueDirectory](/docs/naming.md#usesplitmodeforuniquedirectory) also include: + +`*.received/` + + +All `*.verified.*` files should be committed to source control. + + +### Text file settings + +Text variants of verified and received have the following characteristics: + + * UTF8 with a [Byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark) + * Newlines as line-feed (lf) + * No trailing newline + +This manifests in several ways: + + +#### Source control settings + +All text extensions of `*.verified.*` should have: + + * `eol` set to `lf` + * `working-tree-encoding` set to `UTF-8` + +eg add the following to `.gitattributes` + +``` +*.verified.txt text eol=lf working-tree-encoding=UTF-8 +*.verified.xml text eol=lf working-tree-encoding=UTF-8 +*.verified.json text eol=lf working-tree-encoding=UTF-8 +``` + +#### EditorConfig settings + +If modifying text verified/received files in an editor, it is desirable for the editor to respect the above conventions. For [EditorConfig](https://editorconfig.org/) enabled the following can be used: + +``` +# Verify settings +[*.{received,verified}.{json,txt,xml}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false +``` + + +**Note that the above are suggested for subset of text extension. Add others as required based on the text file types being verified.** + + +### Conventions check + +Conventions can be checked by calling `VerifyChecks.Run()` in a test + + + +```cs +[TestFixture] +public class VerifyChecksTests +{ + [Test] + public Task Run() => + VerifyChecks.Run(); +} +``` +snippet source | anchor + + + +## DiffEngineTray + +Install [DiffEngineTray](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md) + +DiffEngineTray sits in the Windows tray. It monitors pending changes in snapshots, and provides a mechanism for accepting or rejecting those changes. + +``` +dotnet tool install -g DiffEngineTray +``` + +This is optional, but recommended. Also consider enabling [Run at startup](https://github.com/VerifyTests/DiffEngine/blob/main/docs/tray.md#run-at-startup). + +## DiffPlex + +The text comparison behavior of Verify is pluggable. The default behaviour, on failure, is to output both the received +and the verified contents as part of the exception. This can be noisy when verifying large strings. + +[Verify.DiffPlex](https://github.com/VerifyTests/Verify.DiffPlex) changes the text compare result to highlighting text differences inline. + +This is optional, but recommended. + +### Add the NuGet + +```xml + +``` + +### Enable + +```cs +[ModuleInitializer] +public static void Initialize() => + VerifyDiffPlex.Initialize(); +``` + + +## Sample Test + + + +```cs +public class Sample +{ + [Test] + public Task Test() + { + var person = ClassBeingTested.FindPerson(); + return Verify(person); + } +} +``` +snippet source | anchor + + +## Diff Tool + +Verify supports many [Diff Tools](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.md#supported-tools) for comparing received to verified. +While IDEs are supported, due to their MDI nature, using a different Diff Tool is recommended. + +Tools supported by Windows: + + * [BeyondCompare](https://www.scootersoftware.com) + * [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) + * [DeltaWalker](https://www.deltawalker.com/) + * [WinMerge](https://winmerge.org/) + * [TortoiseGitMerge](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseGitIDiff](https://tortoisegit.org/docs/tortoisegitmerge/) + * [TortoiseMerge](https://tortoisesvn.net/TortoiseMerge.html) + * [TortoiseIDiff](https://tortoisesvn.net/TortoiseIDiff.html) + * [KDiff3](https://github.com/KDE/kdiff3) + * [Guiffy](https://www.guiffy.com/) + * [ExamDiff](https://www.prestosoft.com/edp_examdiffpro.asp) + * [Diffinity](https://truehumandesign.se/s_diffinity.php) + * [Rider](https://www.jetbrains.com/rider/) + * [Vim](https://www.vim.org/) + * [Neovim](https://neovim.io/) + diff --git a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AppVeyor.md index c6aec6a8d..b00ffdb86 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AzureDevOps.md index 5d03bd6b5..bca53695e 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_GitHubActions.md index 389ce1279..67c8c5636 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_None.md b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_None.md index 304a47344..72f43e323 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_XunitV3_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_XunitV3_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md index f4b7d1642..b9e323864 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AppVeyor.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md index 59def7f19..bafaaf588 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_AzureDevOps.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md index 5000612a3..537569111 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_GitHubActions.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md b/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md index 38dfb5627..ee57fe94f 100644 --- a/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md +++ b/docs/wiz/Windows_VisualStudio_Gui_Xunit_None.md @@ -18,7 +18,7 @@ Add the following packages to the test project: ```csproj - + ``` diff --git a/src/Verify.Tests/Wizard/TestFramework.cs b/src/Verify.Tests/Wizard/TestFramework.cs index d11951704..e28c4baf1 100644 --- a/src/Verify.Tests/Wizard/TestFramework.cs +++ b/src/Verify.Tests/Wizard/TestFramework.cs @@ -3,6 +3,7 @@ Xunit, XunitV3, NUnit, + TUnit, Fixie, MSTest, Expecto diff --git a/src/Verify.Tests/Wizard/WizardGen.cs b/src/Verify.Tests/Wizard/WizardGen.cs index 2835c5d31..5427da02b 100644 --- a/src/Verify.Tests/Wizard/WizardGen.cs +++ b/src/Verify.Tests/Wizard/WizardGen.cs @@ -435,6 +435,15 @@ dotnet add package Verify.NUnit ``` """); break; + case TestFramework.TUnit: + builder.AppendLine( + """ + ``` + dotnet add package TUnit + dotnet add package Verify.TUnit + ``` + """); + break; case TestFramework.Fixie: builder.AppendLine( """ diff --git a/usages/ExpectoNugetUsage/ExpectoNugetUsage.fsproj b/usages/ExpectoNugetUsage/ExpectoNugetUsage.fsproj index 41563a68d..b41e50a10 100644 --- a/usages/ExpectoNugetUsage/ExpectoNugetUsage.fsproj +++ b/usages/ExpectoNugetUsage/ExpectoNugetUsage.fsproj @@ -9,7 +9,7 @@ - + \ No newline at end of file diff --git a/usages/FixieNugetUsage/FixieNugetUsage.csproj b/usages/FixieNugetUsage/FixieNugetUsage.csproj index 45d9506f5..8a27f04b3 100644 --- a/usages/FixieNugetUsage/FixieNugetUsage.csproj +++ b/usages/FixieNugetUsage/FixieNugetUsage.csproj @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/usages/MSTestNugetUsage/MSTestNugetUsage.csproj b/usages/MSTestNugetUsage/MSTestNugetUsage.csproj index 5034538d4..a5f6fa9cf 100644 --- a/usages/MSTestNugetUsage/MSTestNugetUsage.csproj +++ b/usages/MSTestNugetUsage/MSTestNugetUsage.csproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/usages/NUnitNugetUsage/NUnitNugetUsage.csproj b/usages/NUnitNugetUsage/NUnitNugetUsage.csproj index 68ac93786..2eb1c149f 100644 --- a/usages/NUnitNugetUsage/NUnitNugetUsage.csproj +++ b/usages/NUnitNugetUsage/NUnitNugetUsage.csproj @@ -6,7 +6,7 @@ - + diff --git a/usages/NugetUsage.sln b/usages/NugetUsage.sln index 0a1203787..3b4cdc90b 100644 --- a/usages/NugetUsage.sln +++ b/usages/NugetUsage.sln @@ -21,6 +21,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XunitNugetUsage", "XunitNug EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XunitV3NugetUsage", "XunitV3NugetUsage\XunitV3NugetUsage.csproj", "{21710BF4-6876-4449-8E59-E66F35EC1847}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TUnitNugetUsage", "TUnitNugetUsage\TUnitNugetUsage.csproj", "{4EEF4715-65A9-45F6-8FDC-605A3F5FBFAF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -51,6 +53,10 @@ Global {21710BF4-6876-4449-8E59-E66F35EC1847}.Debug|Any CPU.Build.0 = Debug|Any CPU {21710BF4-6876-4449-8E59-E66F35EC1847}.Release|Any CPU.ActiveCfg = Release|Any CPU {21710BF4-6876-4449-8E59-E66F35EC1847}.Release|Any CPU.Build.0 = Release|Any CPU + {4EEF4715-65A9-45F6-8FDC-605A3F5FBFAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EEF4715-65A9-45F6-8FDC-605A3F5FBFAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EEF4715-65A9-45F6-8FDC-605A3F5FBFAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EEF4715-65A9-45F6-8FDC-605A3F5FBFAF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/usages/TUnitNugetUsage/TUnitNugetUsage.csproj b/usages/TUnitNugetUsage/TUnitNugetUsage.csproj new file mode 100644 index 000000000..1c1c53b5f --- /dev/null +++ b/usages/TUnitNugetUsage/TUnitNugetUsage.csproj @@ -0,0 +1,12 @@ + + + net9.0 + Exe + + + + + + + + \ No newline at end of file diff --git a/usages/XunitNugetUsage/XunitNugetUsage.csproj b/usages/XunitNugetUsage/XunitNugetUsage.csproj index 5fd4df354..57ad8cdd6 100644 --- a/usages/XunitNugetUsage/XunitNugetUsage.csproj +++ b/usages/XunitNugetUsage/XunitNugetUsage.csproj @@ -5,7 +5,7 @@ - + diff --git a/usages/XunitV3NugetUsage/XunitV3NugetUsage.csproj b/usages/XunitV3NugetUsage/XunitV3NugetUsage.csproj index eb5862ce5..94029f620 100644 --- a/usages/XunitV3NugetUsage/XunitV3NugetUsage.csproj +++ b/usages/XunitV3NugetUsage/XunitV3NugetUsage.csproj @@ -6,7 +6,7 @@ - +