blob: 4968cc15da6d49290429aabd78cedaee96ca3043 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package com.example;
public class MyAspectTest {
public static void main(String []argv) {
A a = new ABean();
try {
if (!a.a("aha").equals("aha")) {
throw new IllegalStateException();
}
throw new IllegalStateException();
//Assert.assertEquals("aha", a.a("aha"));
//Assert.fail("Failed due to a weaving problem.");
}
catch (Exception e) {
if (!e.getMessage().equals("OK")) {
throw new IllegalStateException();
}
//Assert.assertEquals("OK", e.getMessage());
}
}
}
|