public void TryValidate_ShouldShowMessageBox_WhenValueIsNullOrEmpty() { IMessageBoxService messageBoxService = Substitute.For <IMessageBoxService>(); mSut.TryValidate(messageBoxService); messageBoxService.Received(1).ShowError("An application name must be assigned to this appender."); }