public void On_methods_are_noops_when_null() { var handler = new OperationReportHandler(); handler.OnWarning("Princess Celestia is in danger."); handler.OnInformation("Princess Celestia is on her way."); handler.OnVerbose("Princess Celestia is an alicorn."); }
public void OnVerbose_works() { string result = null; var handler = new OperationReportHandler(verboseHandler: m => result = m); var message = "Princess Celestia is an alicorn."; handler.OnVerbose(message); Assert.Equal(message, result); }