~nunit-core/nunitv2/2.5

« back to all changes in this revision

Viewing changes to src/NUnitFramework/framework/ExpectedExceptionAttribute.cs

  • Committer: jnewkirk
  • Date: 2002-07-10 20:05:24 UTC
  • Revision ID: vcs-imports@canonical.com-20020710200524-z33q2om2qvsgs6kg
initialĀ load

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// Copyright (C) 2002. James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. All Rights Reserved.
 
3
//
 
4
namespace Nunit.Framework
 
5
{
 
6
        using System;
 
7
 
 
8
        /// <summary>
 
9
        /// ExpectedAttributeException.
 
10
        /// </summary>
 
11
        /// 
 
12
        [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
 
13
        public sealed class ExpectedExceptionAttribute : Attribute
 
14
        {
 
15
                private Type expectedException;
 
16
 
 
17
                public ExpectedExceptionAttribute(Type exceptionType)
 
18
                {
 
19
                        expectedException = exceptionType;
 
20
                }
 
21
 
 
22
                public Type ExceptionType 
 
23
                {
 
24
                        get{ return expectedException; }
 
25
                        set{ expectedException = value; }
 
26
                }
 
27
 
 
28
}
 
29
}