0
|
1 using System;
|
|
2
|
|
3 using BLToolkit.Aspects;
|
|
4
|
|
5 using NUnit.Framework;
|
|
6
|
|
7 namespace UnitTests.All
|
|
8 {
|
|
9 //[TestFixture]
|
|
10 public class GetValueTest
|
|
11 {
|
|
12 [ExpectedException(typeof(ApplicationException))]
|
|
13 public void Test()
|
|
14 {
|
|
15 try
|
|
16 {
|
|
17 var info = new InterceptCallInfo();
|
|
18
|
|
19 info.ParameterValues = new object[2];
|
|
20 info.ParameterValues[0] = "123";
|
|
21 info.ParameterValues[1] = 123;
|
|
22
|
|
23 throw new ApplicationException();
|
|
24 }
|
|
25 catch (Exception ex)
|
|
26 {
|
|
27 Console.WriteLine(ex);
|
|
28 Console.WriteLine(ex);
|
|
29 throw;
|
|
30 }
|
|
31 }
|
|
32
|
|
33 public void Test(out int i3, out decimal d4)
|
|
34 {
|
|
35 object o = (decimal)123;
|
|
36
|
|
37 d4 = (decimal)o;
|
|
38
|
|
39 o = (int)123;
|
|
40
|
|
41 i3 = (int)o;
|
|
42 }
|
|
43 }
|
|
44 }
|