-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca92a61
commit 15e134d
Showing
5 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
netty-design-patterns-chain of responsibility/src/test/java/cn/mushuwei/chain/AppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cn.mushuwei.chain; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* @author james mu | ||
* @date 2020/4/10 18:18 | ||
*/ | ||
public class AppTest { | ||
|
||
@Test | ||
public void test() { | ||
App.main(new String[]{}); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...esign-patterns-chain of responsibility/src/test/java/cn/mushuwei/chain/ITCompanyTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cn.mushuwei.chain; | ||
|
||
import cn.mushuwei.chain.quest.Request; | ||
import cn.mushuwei.chain.quest.RequestType; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
/** | ||
* @author james mu | ||
* @date 2020/4/10 18:04 | ||
*/ | ||
public class ITCompanyTest { | ||
|
||
private static final List<Request> REQUESTS = | ||
Arrays.asList(new Request(RequestType.PRODUCT_MANGER, "业务决策、目标拆分、需求分析和协同落地"), | ||
new Request(RequestType.SOFTWARE_ENGINNER,"负责架构设计与开发,能够带领团队进行技术攻关"), | ||
new Request(RequestType.QA_ENGINNER, "缺陷跟踪、软件质量度量及风险预估")); | ||
|
||
@Test | ||
public void testMakeQuest() { | ||
ITCompany itCompany = new ITCompany(); | ||
|
||
REQUESTS.forEach(request -> { | ||
itCompany.makeRequest(request); | ||
assertTrue( | ||
request.isHandled(), | ||
"公司新项目所有需求希望被处理, 但是 [" + request + "] 没有!" | ||
); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>let_netty_easy</artifactId> | ||
<groupId>com.sanshengshui</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>netty-design-patterns-singleton</artifactId> | ||
|
||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters