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 OnWarning_works() { string result = null; var handler = new OperationReportHandler(warningHandler: m => result = m); var message = "Princess Celestia is in danger."; handler.OnWarning(message); Assert.Equal(message, result); }