Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Mar 13, 2024
1 parent aaa8294 commit c626045
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
32 changes: 32 additions & 0 deletions src/ModuleInitDocs/OnHandlers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
public class OnHandlers
{
#region OnHandlers

public static class ModuleInitializer
{
[ModuleInitializer]
public static void Init()
{
VerifierSettings.OnVerify(
before: () => Debug.WriteLine("before"),
after: () => Debug.WriteLine("after"));
VerifierSettings.OnFirstVerify(
(receivedFile, receivedText) =>
{
Debug.WriteLine(receivedFile);
Debug.WriteLine(receivedText);
return Task.CompletedTask;
});
VerifierSettings.OnVerifyMismatch(
(filePair, message) =>
{
Debug.WriteLine(filePair.ReceivedPath);
Debug.WriteLine(filePair.VerifiedPath);
Debug.WriteLine(message);
return Task.CompletedTask;
});
}
}

#endregion
}
26 changes: 0 additions & 26 deletions src/Verify.Tests/Snippets/Snippets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,6 @@ void EnableClipboard()
#endregion
}

#region OnHandlers

public Task OnHandlersSample()
{
VerifierSettings.OnVerify(
before: () => Debug.WriteLine("before"),
after: () => Debug.WriteLine("after"));
VerifierSettings.OnFirstVerify(
(receivedFile, receivedText) =>
{
Debug.WriteLine(receivedFile);
return Task.CompletedTask;
});
VerifierSettings.OnVerifyMismatch(
(filePair, message) =>
{
Debug.WriteLine(filePair.ReceivedPath);
Debug.WriteLine(filePair.VerifiedPath);
Debug.WriteLine(message);
return Task.CompletedTask;
});
return Verify("value");
}

#endregion

void TreatAsString()
{
#region TreatAsString
Expand Down

0 comments on commit c626045

Please sign in to comment.