Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 94ab574

Browse files
committed
增加一种假的异常放到注解中
1 parent 7c79800 commit 94ab574

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

src/main/java/org/suren/autotest/web/framework/annotation/AutoExpect.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.suren.autotest.web.framework.annotation;
22

3+
import org.suren.autotest.web.framework.core.AutoFakeException;
4+
35
import java.lang.annotation.*;
46

57
/**
@@ -15,7 +17,7 @@
1517
* 如果方法调用中没有发生指定的异常,则认为用例失败
1618
* @return 期待发生的异常
1719
*/
18-
Class expect();
20+
Class expect() default AutoFakeException.class;
1921

2022
/**
2123
* @return 可以接受的异常,则发生这些异常也认为是正常情况
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
*
3+
* * Copyright 2002-2007 the original author or authors.
4+
* *
5+
* * Licensed under the Apache License, Version 2.0 (the "License");
6+
* * you may not use this file except in compliance with the License.
7+
* * You may obtain a copy of the License at
8+
* *
9+
* * http://www.apache.org/licenses/LICENSE-2.0
10+
* *
11+
* * Unless required by applicable law or agreed to in writing, software
12+
* * distributed under the License is distributed on an "AS IS" BASIS,
13+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* * See the License for the specific language governing permissions and
15+
* * limitations under the License.
16+
*
17+
*/
18+
19+
package org.suren.autotest.web.framework.core;
20+
21+
/**
22+
* @author suren
23+
*/
24+
public class AutoFakeException
25+
{
26+
}

0 commit comments

Comments
 (0)