Skip to content

Commit 3ae4d79

Browse files
authored
Merge pull request #1 from ZHANGSHUNLIN/dev0
add test cases
2 parents 148ea06 + 506239c commit 3ae4d79

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package great.project;
2+
3+
/*
4+
* Copyright (c) 2025. The BifroMQ Authors. All Rights Reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and limitations under the License.
14+
*/
15+
16+
public class Foo {
17+
18+
public void foo() {
19+
System.out.println("Foo");
20+
}
21+
22+
public void bar(boolean isPrint) {
23+
if (isPrint) {
24+
foo();
25+
} else {
26+
System.out.println(System.currentTimeMillis());
27+
}
28+
}
29+
30+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package great.project;
2+
3+
/*
4+
* Copyright (c) 2025. The BifroMQ Authors. All Rights Reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and limitations under the License.
14+
*/
15+
16+
import org.testng.annotations.Test;
17+
18+
public class FooTest {
19+
20+
@Test
21+
public void foo() {
22+
Foo foo = new Foo();
23+
foo.foo();
24+
}
25+
26+
@Test
27+
public void bar() {
28+
Foo foo = new Foo();
29+
foo.bar(true);
30+
}
31+
}

0 commit comments

Comments
 (0)