-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hertzbeat] add more unit test case and example (#324)
[manger] add mockito unit test [manger] add mockito unit test [hertzbeat] test framework demo [hertzbeat] test framework demo [hertzbeat] test framework demo
- Loading branch information
Showing
83 changed files
with
2,360 additions
and
120 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
alerter/src/test/java/com/usthe/alert/AlerterWorkerPoolTest.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,21 @@ | ||
package com.usthe.alert; | ||
|
||
import com.usthe.alert.controller.AlertDefineController; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlerterWorkerPool} | ||
*/ | ||
class AlerterWorkerPoolTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void executeJob() { | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
alerter/src/test/java/com/usthe/alert/controller/AlertDefineControllerTest.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,40 @@ | ||
package com.usthe.alert.controller; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlertDefineController} | ||
*/ | ||
class AlertDefineControllerTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void addNewAlertDefine() { | ||
} | ||
|
||
@Test | ||
void modifyAlertDefine() { | ||
} | ||
|
||
@Test | ||
void getAlertDefine() { | ||
} | ||
|
||
@Test | ||
void deleteAlertDefine() { | ||
} | ||
|
||
@Test | ||
void applyAlertDefineMonitorsBind() { | ||
} | ||
|
||
@Test | ||
void getAlertDefineMonitorsBind() { | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
alerter/src/test/java/com/usthe/alert/controller/AlertDefinesControllerTest.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,24 @@ | ||
package com.usthe.alert.controller; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlertDefinesController} | ||
*/ | ||
class AlertDefinesControllerTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void getAlertDefines() { | ||
} | ||
|
||
@Test | ||
void deleteAlertDefines() { | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
alerter/src/test/java/com/usthe/alert/controller/AlertsControllerTest.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,40 @@ | ||
package com.usthe.alert.controller; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlertsController} | ||
*/ | ||
class AlertsControllerTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void getAlerts() { | ||
} | ||
|
||
@Test | ||
void deleteAlerts() { | ||
} | ||
|
||
@Test | ||
void clearAllAlerts() { | ||
} | ||
|
||
@Test | ||
void applyAlertDefinesStatus() { | ||
} | ||
|
||
@Test | ||
void getAlertsSummary() { | ||
} | ||
|
||
@Test | ||
void addNewAlertReport() { | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
alerter/src/test/java/com/usthe/alert/service/AlertDefineServiceTest.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,61 @@ | ||
package com.usthe.alert.service; | ||
|
||
import com.usthe.alert.controller.AlertDefineController; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlertDefineService} | ||
*/ | ||
class AlertDefineServiceTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void validate() { | ||
} | ||
|
||
@Test | ||
void addAlertDefine() { | ||
} | ||
|
||
@Test | ||
void modifyAlertDefine() { | ||
} | ||
|
||
@Test | ||
void deleteAlertDefine() { | ||
} | ||
|
||
@Test | ||
void getAlertDefine() { | ||
} | ||
|
||
@Test | ||
void deleteAlertDefines() { | ||
} | ||
|
||
@Test | ||
void getMonitorBindAlertDefines() { | ||
} | ||
|
||
@Test | ||
void applyBindAlertDefineMonitors() { | ||
} | ||
|
||
@Test | ||
void testGetMonitorBindAlertDefines() { | ||
} | ||
|
||
@Test | ||
void getAlertDefines() { | ||
} | ||
|
||
@Test | ||
void getBindAlertDefineMonitors() { | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
alerter/src/test/java/com/usthe/alert/service/AlertServiceTest.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,44 @@ | ||
package com.usthe.alert.service; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlertService} | ||
*/ | ||
class AlertServiceTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void addAlert() { | ||
} | ||
|
||
@Test | ||
void getAlerts() { | ||
} | ||
|
||
@Test | ||
void deleteAlerts() { | ||
} | ||
|
||
@Test | ||
void clearAlerts() { | ||
} | ||
|
||
@Test | ||
void editAlertStatus() { | ||
} | ||
|
||
@Test | ||
void getAlertsSummary() { | ||
} | ||
|
||
@Test | ||
void addNewAlertReport() { | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
alerter/src/test/java/com/usthe/alert/util/AlertTemplateUtilTest.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,21 @@ | ||
package com.usthe.alert.util; | ||
|
||
import com.usthe.alert.service.AlertService; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link AlertTemplateUtil} | ||
*/ | ||
class AlertTemplateUtilTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@Test | ||
void render() { | ||
} | ||
} |
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
65 changes: 0 additions & 65 deletions
65
collector/src/main/java/com/usthe/collector/util/SpringContextHolder.java
This file was deleted.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
collector/src/test/java/com/usthe/collector/collect/common/cache/CommonCacheTest.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,41 @@ | ||
package com.usthe.collector.collect.common.cache; | ||
|
||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
/** | ||
* Test case for {@link CommonCache} | ||
*/ | ||
class CommonCacheTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
} | ||
|
||
@AfterEach | ||
void tearDown() { | ||
} | ||
|
||
@Test | ||
void addCache() { | ||
} | ||
|
||
@Test | ||
void testAddCache() { | ||
} | ||
|
||
@Test | ||
void getCache() { | ||
} | ||
|
||
@Test | ||
void removeCache() { | ||
} | ||
|
||
@Test | ||
void getInstance() { | ||
} | ||
} |
Oops, something went wrong.