title: Checking if argument is thrown in unit-tests
body: <p>I'm working on unit-tests for an application which has a constructor that takes three values as arguments. The numbers shall be 0 or higher, and now I'm writing on an unit-test for the constructor that throws an exception if this is not the case.</p>
  
  <p>What I can't figure out is how I what to write after "Assert" to determine this so that the test passes if illegal numbers are passed to the constructor. Thanks in advance.</p>
  
  <p>EDIT: I'm using MSTest framework</p>
  
  <pre><code>   public void uniqueSidesTest2()
      {
          try {
              Triangle_Accessor target = new Triangle_Accessor(0, 10, 10);
          }
          catch (){
              Assert // true (pass the test)
              return;
          }
  
          Assert. // false (test fails)
      }
  </code></pre>
  
  <p>// From the code...</p>
  
  <pre><code>    public Triangle(double a, double b, double c) {
          if ((a &lt;= 0) || (b &lt;= 0) || (c &lt;= 0)){
              throw new ArgumentException("The numbers must higher than 0.");
          }
          sides = new double[] { a, b, c };
      }
  </code></pre>