title: Can I configure NUnit so that Debug.Fail doesn't show a message box when I run my tests?
body: <p>I have this property:</p>
  
  <pre><code>    public SubjectStatus Status
      {
          get { return status; }
          set
          {
              if (Enum.IsDefined(typeof(SubjectStatus), value))
              {
                  status = value;
              }
              else
              {
                  Debug.Fail("Error setting Subject.Status", "There is no SubjectStatus enum constant defined for that value.");
                  return;
              }
          }
      }
  </code></pre>
  
  <p>and this unit test</p>
  
  <pre><code>    [Test]
      public void StatusProperty_StatusAssignedValueWithoutEnumDefinition_StatusUnchanged()
      {
          Subject subject = new TestSubjectImp("1");
  
          //  assigned by casting from an int to a defined value
          subject.Status = (SubjectStatus)2;
          Assert.AreEqual(SubjectStatus.Completed, subject.Status);            
  
          //  assigned by casting from an int to an undefined value
          subject.Status = (SubjectStatus)100;
          //  no change to previous value
          Assert.AreEqual(SubjectStatus.Completed, subject.Status);            
      }
  </code></pre>
  
  <p>Is there a way I can prevent Debug.Fail displaying a message box when I run my tests, but allow it to show me one when I debug my application?</p>