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 f3692c68cd..41a0e8b940 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 0000000000..d9192cfe9d --- /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 0000000000..2003cfcb76 --- /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 0000000000..a9a42b5b9d --- /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 0000000000..f8c1525243 --- /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 0000000000..fc8c16c4a0 --- /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 1cb70a3f7c..91a69863b5 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 0000000000..f767037284 --- /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 0000000000..ae6767260a --- /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 0000000000..92f6e6c44e --- /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 0000000000..7157a629ae --- /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 0000000000..ea4ab72743 --- /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 02eb853a92..4ed93a21a8 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 0000000000..533f13c1fd --- /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 0000000000..4ce1c7fef1 --- /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 0000000000..23f970c64e --- /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 0000000000..2700478108 --- /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 0000000000..fbd3395edb --- /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 947121d66e..88dcfdfc73 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 0000000000..90b032e9f3 --- /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 0000000000..e1171f9a7b --- /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 0000000000..dcfe1866be --- /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 0000000000..d66d71251b --- /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 0000000000..a1613ef089 --- /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 b81c7d43ba..84b6e2ec14 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 0000000000..ea9b63c79f --- /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 0000000000..74bbd08acd --- /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 0000000000..bb12b56697 --- /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 0000000000..e1fe65068e --- /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 0000000000..68fe0637ea --- /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 6f38be4e0a..36c8b3d86c 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 0000000000..8e4afa012e --- /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 0000000000..3f06a98c6f --- /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 0000000000..fd060ed8df --- /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 0000000000..54ca2ec793 --- /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 0000000000..fa54cfeb9b --- /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 e8c0cfc892..7eeb590bd3 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 0000000000..c775034510 --- /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 0000000000..4d5f3a06bd --- /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 0000000000..f8048275c5 --- /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 0000000000..ff7444f9d9 --- /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 0000000000..7a7658a6f9 --- /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 36ec798714..ed9daf4484 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 0000000000..6cd3e689aa --- /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 0000000000..421cfa09b0 --- /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 0000000000..3388e5d2c1 --- /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 0000000000..f11c0d0337 --- /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 0000000000..e7b3a6706f --- /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 a25b4a508d..dd62c654aa 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 0000000000..c3b8232baf --- /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 0000000000..2e4b8c0ae0 --- /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 0000000000..04c5809383 --- /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 0000000000..03d242291d --- /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 0000000000..b0260c58fa --- /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 9df61bc514..74738448ac 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 0000000000..473b98bbdb --- /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 0000000000..2e88f90858 --- /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 0000000000..96de631ed0 --- /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 0000000000..ee7c96253f --- /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 0000000000..d7f42df61c --- /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 080c76f15a..64dfa43d0f 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 0000000000..f111e4e24d --- /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 0000000000..a8fb8b845f --- /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 0000000000..755a0de5c0 --- /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 0000000000..f10a89c621 --- /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 0000000000..54460fcdbb --- /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 001439b9f2..5f331b606c 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 0000000000..49433a2267 --- /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 0000000000..274ff4efdf --- /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 0000000000..a636cab2e2 --- /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 0000000000..cd276e47d3 --- /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 0000000000..6ed89d41a8 --- /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 d54136da1e..32a394ccf5 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 0000000000..66110d3bad --- /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 0000000000..0fd3602c9a --- /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 0000000000..5b2449b80d --- /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 0000000000..bf61ae982a --- /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 0000000000..a04fefa044 --- /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 55683cd7f3..29715860bb 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 0000000000..3a2a9a11e6 --- /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 0000000000..d86a3aa3e2 --- /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 0000000000..7043986540 --- /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 0000000000..7c20b6df52 --- /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 0000000000..56b58969b0 --- /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 a9b9830244..6283668902 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 0000000000..583e719557 --- /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 0000000000..97fec3da66 --- /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 0000000000..3c69dae4a0 --- /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 0000000000..5037165416 --- /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 0000000000..8336043f99 --- /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 d876c65d4f..b179b09ebc 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 0000000000..662e6cc9cd --- /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 0000000000..affadb77df --- /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 0000000000..2b6112d24d --- /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 0000000000..3d7d554dee --- /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 0000000000..202d9fb8e8 --- /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 c60fe9478b..62af3c6438 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 0000000000..e86486e09d --- /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 0000000000..e46067a015 --- /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 0000000000..6fc9af060e --- /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 0000000000..aacd44c060 --- /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 0000000000..984976d4ae --- /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 1b9d8eed26..83d1c0c682 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 9cdc4deaba..cd859cc4ef 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 4284cc05e6..30b8ffd6ca 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 aa567ffe47..a6fbfa4c9f 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 dff302df7d..4701837f82 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 5a9f28193e..d97a8c9e8d 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 6bc33555cd..f9dc285876 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 25b040116c..4755bc6f11 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 aa704d372b..e098358e2c 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 dedf1d1f1c..2a7aa54541 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 4963999c67..cabbe86666 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 244b3e8bd0..5aec90830f 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 ff16bd5c11..8c6ae7154d 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 7acd168ba3..5b7f653243 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 5bb8e6e9f3..de76a7e75a 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 9be3d5cb52..8a9106fddf 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 3b4a75f3bc..0874176721 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 0000000000..bfb8b06b2a --- /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 0000000000..46b04e21c2 --- /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 0000000000..c37c8cc0ea --- /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 0000000000..4fa8fe3f13 --- /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 0000000000..cd2b5e5573 --- /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 880f2ed732..3e8681dfb1 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 802e49d75d..8ba7916145 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 c0dda74461..208c67b307 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 32331b4e62..58853ee95a 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 98938493c3..f4945d1a30 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 319e41105f..8905103aba 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 d3308040cb..acfef910b9 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 d5ed3bc568..5df6384eee 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 efafa235a2..9946a564ca 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 0000000000..15719fa25b --- /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 0000000000..6abfcac89c --- /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 0000000000..f6c7dbbb4f --- /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 0000000000..3edda8bea6 --- /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 0000000000..15b06e03a6 --- /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 9ad8c38e3c..9e7b763e77 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 ce794fcd0d..8d182a87ef 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 c3cbcf12c9..28aef4acfb 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 9307938cd8..eaa79c598f 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 2236a7dbaa..1ecea93eea 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 4014572073..dea30ae7f0 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 0d0b793aa9..c8f5c7f92f 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 21ddca421d..d5db2b9ef8 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 8e36905618..d2c6f63b73 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 926ca7ad1a..29b6277d4a 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 8adb17a0bc..954fb2edaf 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 5ac97c6838..b1829be9ab 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 4b5a12df6e..d1fd8b3e6f 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 5e6ac0b1dc..d8b9c9475c 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 31df3ad01b..aa3d9888bf 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 d1ae3c0b03..6177edd187 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 c214518888..2337ca30ad 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 0000000000..b041dba7ae --- /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 0000000000..13a05d3868 --- /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 0000000000..87f0d44f78 --- /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 0000000000..b99e4a14b3 --- /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 0000000000..50003a6c49 --- /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 e581a96c64..68f22dc2db 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 63e3ad4578..6da435049f 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 545b9c67a0..785d483e81 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 09cb991d6f..66ca815aee 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 af1a28ef3a..e916cb4913 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 1a23c19d64..614e258afc 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 cec3c94284..21e044f535 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 07468225d2..7d37ca1393 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 aba8467b0a..4563996c54 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 0000000000..2ddba7c3b2 --- /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 0000000000..770e0a1007 --- /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 0000000000..223a54e443 --- /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 0000000000..28a40922f9 --- /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 0000000000..04f2e090ab --- /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 bb24c3eed5..4706f36814 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 ff7fe81372..78baedd236 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 a48d66a264..dbe263a1d1 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 c6954b88ac..ba388a434c 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 e0580f7592..d09197b917 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 94444ad51f..7de9b2c6b7 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 5172d00337..74121b942d 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 1db6991b8d..f1955e0df3 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 3ce624a09d..365a0c4c66 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 4bf1931def..8544739e4a 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 51831120e2..83f3825b77 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 3530731ea3..4fadeca6ae 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 e3e10715b1..738987fa74 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 2856a248f3..454df9be33 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 7be9317766..939119fd38 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 3ced13c70a..fdcd07f035 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 7c4b6218f9..5cd7fc6b22 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 0000000000..910202ec86 --- /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 0000000000..6938cee139 --- /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 0000000000..5e2c0f8df1 --- /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 0000000000..9ac4664202 --- /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 0000000000..ffbb884aed --- /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 3e21f0fd09..7c00cdccfe 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 96e8fbed3e..0b82f20b19 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 98b5ce2ade..0f7a7b9ab0 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 80067a7adc..ae40f5d44f 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 cae1ccea0b..5592dae1b8 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 0da4637c6d..c37f5292d9 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 89165254a3..d6c8230fa7 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 4d5921e0dd..4ca67e7737 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 83808129f3..7416d4bd93 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 0000000000..367b954e65 --- /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 0000000000..19f4a8cabd --- /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 0000000000..b57991f689 --- /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 0000000000..e4d40f9fae --- /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 0000000000..18b18dc6e3 --- /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 f937ac156f..fc75de84a8 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 3d39b653fd..8fe5879df0 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 5f370cf3dd..9383a53a68 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 485508a1ca..f00f48a11b 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 9d6e0efe31..4dd741d181 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 bec9d44ed1..9e0e4338fb 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 5e8bb183e1..037252c174 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 33766402a4..5a1f153fab 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 825ec04c67..6682c5c40a 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 104daf7252..9b97bf1053 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 816100caa6..774af00ab9 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 07c1c3d473..e983253cca 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 847e47af2a..2c84405982 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 bbf3fcdffc..d4ccf8f438 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 ac8f0ba949..146efc3778 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 25e5b14a77..fbdda15bb7 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 4205714abb..9381ed618c 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 0000000000..5adecdc2f9 --- /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 0000000000..b60ce64241 --- /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 0000000000..c6cefe264f --- /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 0000000000..3b9c8027b0 --- /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 0000000000..132349e04b --- /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 0b483eec62..7837f2cbd4 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 28a5d10802..ef381746c2 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 d6a5940b87..71908e91dd 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 637f31cb03..1eccc0a536 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 9b41976f29..8f10626248 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 09758eb0b8..12ce814c0d 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 f719d98761..dda79b4f75 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 efca2b3eb5..cea8a4f1c8 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 76d08cc4da..c48a0459b9 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 0000000000..898d7afa14 --- /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 0000000000..eccaef59b6 --- /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 0000000000..696d622031 --- /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 0000000000..8f5573110b --- /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 0000000000..1ca5668d0b --- /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 1e63c71479..71ca9199f7 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 704ca50041..62782e00f8 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 a34c08a4a5..9fdf97a33d 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 49261a791e..ce3b74f680 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 bea5664f4b..df79b46ee1 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 a35a6a2ab3..63ac51933f 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 893c7c92ce..3b7405196a 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 c918cbfdd9..d871685534 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 0cc2d0e6a7..c2dc35e647 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 07f8998e27..9ddc60c456 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 6c185fa802..71ef11491f 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 b2e21a5a2e..66a38f25b1 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 10f9c3c22a..bfd492f199 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 9881a05315..519e2896fa 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 d6b9bb4eaa..04f4cc7056 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 ac2522376b..0cc8adf53e 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 5fe8627ea4..7104488c3f 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 0000000000..1e32954095 --- /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 0000000000..6e9fe3caf7 --- /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 0000000000..aa1cd74c6f --- /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 0000000000..0f8fcfbafc --- /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 0000000000..a78c1f1ffc --- /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 9780897523..0b1b8034fb 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 95265a6a26..979b8739fd 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 e1203d87d8..f7bb5604b9 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 f903d37abc..f0850ec527 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 71d608e0aa..5f35e0b38e 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 d52c352472..d9d062ae0a 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 841d002758..3b2facf8e1 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 123072453c..2a37c85707 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 d4290876ce..6730a07f05 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 0000000000..cd090d654d --- /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 0000000000..08840c8e54 --- /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 0000000000..7327e3e686 --- /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 0000000000..1b0df2244b --- /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 0000000000..da917245ca --- /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 2ac04ebbd2..116575e064 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 1abf7992ec..81a2aa3228 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 1a18c44d74..c26a437321 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 358fb34ed5..b2c283fb8f 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 b8d3f7f9aa..cfa4ef80f3 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 b42d8b746a..3fa05a4b0c 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 208759d5e2..799a99a3c8 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 0536418751..e6dbbf4f84 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 dacb2723e1..d11cb96231 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 d97debb40f..e41382f89e 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 0b7f1b6be3..ae6a787aa6 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 672e0877e4..4f9c820fcb 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 f3a4143a20..8bccc45aaa 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 6bbfc4365b..f82ab828a2 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 aaee0824e2..8fef5275de 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 7596096cf7..1bccdaee49 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 0e411f91ba..b63be3e5d1 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 0000000000..874dd5dc46 --- /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 0000000000..33589b800b --- /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 0000000000..01cea064c4 --- /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 0000000000..6bd78285d7 --- /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 0000000000..4c9f6642ac --- /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 ce1971496d..baea5909a3 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 11808c52fc..d99be81dc1 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 9e1689c75e..7964369054 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 e876291cf4..ab1d91a848 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 80bea5f879..6f87bf15e4 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 082eb36ae7..502e8e0156 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 57f2ea2ee0..c21af1fbc0 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 4f0d80a740..5db1518ca1 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 0b0ebd037c..8228850296 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 0000000000..6d2acd4c8b --- /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 0000000000..519c17acd3 --- /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 0000000000..047bf461f8 --- /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 0000000000..374a6c3034 --- /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 0000000000..03f94611d2 --- /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 884374492d..37cab86775 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 b8a5c7ef2e..d2e3a2c5ea 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 2291e809ff..d0bca142a4 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 6cffe9b200..25bc6f480f 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 3180f08a84..efd631bcb0 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 2942f80978..6e570a62c9 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 79214f76c8..d14918bded 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 d66d4d7137..add397c422 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 f270db1b91..e050f09679 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 55b64299e4..48bee37a09 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 709b050e43..ec6ef6d80c 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 5487c22ebc..0712afb2fc 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 cebb10c8f5..8523272a61 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 21ad3f7cd2..eb53d971aa 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 d45a282b30..3106960630 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 b50a3edba4..e975f17920 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 b78282b4cc..215ee3a611 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 0000000000..4ef20dcadc --- /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 0000000000..85449ae842 --- /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 0000000000..1f82f11192 --- /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 0000000000..b6e0c2112f --- /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 0000000000..dba106507e --- /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 d9f72aab89..a5888bef02 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 59b8fc1b4d..5f159ca9e8 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 e5289ef48d..78fc489694 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 2e6a1202a3..014eed5f85 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 5040f25c9e..92e66eec78 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 e9587c25cb..5738583083 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 7491869c34..7ada2862c5 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 222acd7795..686eef7067 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 3532e7bf6e..969006d346 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 0000000000..b77c802280 --- /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 0000000000..bf1a96c022 --- /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 0000000000..2277667570 --- /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 0000000000..ade3334e05 --- /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 0000000000..c7fb3c9325 --- /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 729525fd46..4faacd58dd 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 ff24078570..90d87bc710 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 439c47b48c..1848206935 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 c0469d18e6..b1d1c6c0b1 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 2946d7ee32..a2b8187320 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 3608c08d32..e827807707 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 e9d6a079b4..b89d2f6eca 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 a75bbdb430..b6ac6d25c9 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 c660726912..a52ee7d703 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 82b6c7d0c7..50aaae06be 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 205cc7ab45..49a7b23c59 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 8406470423..65ea594205 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 deafa92bef..8a19d951d9 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 4f988c5b00..a26d06a1f6 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 81aff28471..123e5ef218 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 7ed6673294..397a7baae0 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 b61750b7f9..a4653850e0 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 0000000000..35c541ddf9 --- /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 0000000000..70068f1f8f --- /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 0000000000..f51c08e9a1 --- /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 0000000000..d62e228167 --- /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 0000000000..e442a3e5db --- /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 c6aec6a8d3..b00ffdb869 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 5d03bd6b5b..bca53695e1 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 389ce12791..67c8c5636b 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 304a473445..72f43e323e 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 f4b7d1642c..b9e3238645 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 59def7f199..bafaaf5882 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 5000612a39..537569111e 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 38dfb56276..ee57fe94f5 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 d119517046..e28c4baf11 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 2835c5d31e..5427da02b0 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 41563a68d2..b41e50a106 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 45d9506f57..8a27f04b34 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 5034538d42..a5f6fa9cf7 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 68ac937860..2eb1c149fb 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 0a1203787f..3b4cdc90b9 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 0000000000..1c1c53b5f0 --- /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 5fd4df354c..57ad8cdd61 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 eb5862ce55..94029f6206 100644 --- a/usages/XunitV3NugetUsage/XunitV3NugetUsage.csproj +++ b/usages/XunitV3NugetUsage/XunitV3NugetUsage.csproj @@ -6,7 +6,7 @@ - +