File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
src/test/java/scouter/plugin/server/alert/line Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >com.github.scouter-project</groupId >
8
8
<artifactId >scouter-plugin-server-alert-line</artifactId >
9
- <version >1.0-SNAPSHOT </version >
9
+ <version >1.0.0 </version >
10
10
11
11
<properties >
12
12
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
119
119
</execution >
120
120
</executions >
121
121
</plugin >
122
+ <plugin >
123
+ <groupId >org.apache.maven.plugins</groupId >
124
+ <artifactId >maven-source-plugin</artifactId >
125
+ <executions >
126
+ <execution >
127
+ <id >attach-sources</id >
128
+ <goals >
129
+ <goal >jar</goal >
130
+ </goals >
131
+ </execution >
132
+ </executions >
133
+ </plugin >
122
134
</plugins >
123
135
</build >
124
136
</project >
Original file line number Diff line number Diff line change 17
17
*/
18
18
@ RunWith (MockitoJUnitRunner .class )
19
19
public class LinePluginTest {
20
+ public final static String lineAccessToken = "Wd8jVkD5Fzh7CMl1CTmyOo9ILtWq1MoknQ7kbTMMjQmdU6+cDmfqkwwuE5mB5rLQcFeWCjvjJgnE/MmqT6D+gEsO68vKQh11YygUT7dQmh1JwmWG5mbRqk98Xo1+aBWHllG0AL/6xAp7YMtG9MDVPwdB04t89/1O/w1cDnyilFU=" ;
21
+ public static final String lineGroupId = "C0246cfa665d99ec6dde3f12bec77eb4a" ;
22
+
20
23
@ Mock Configure conf ;
21
24
@ InjectMocks LinePlugin plugin = new LinePlugin ();
22
25
23
26
@ Test
24
27
public void alert () throws Exception {
25
- when (conf .getValue ("ext_plugin_line_access_token" )).thenReturn ("Wd8jVkD5Fzh7CMl1CTmyOo9ILtWq1MoknQ7kbTMMjQmdU6+cDmfqkwwuE5mB5rLQcFeWCjvjJgnE/MmqT6D+gEsO68vKQh11YygUT7dQmh1JwmWG5mbRqk98Xo1+aBWHllG0AL/6xAp7YMtG9MDVPwdB04t89/1O/w1cDnyilFU=" );
26
- when (conf .getValue ("ext_plugin_line_group_id" )).thenReturn ("C0246cfa665d99ec6dde3f12bec77eb4a" );
28
+ when (conf .getValue ("ext_plugin_line_access_token" )).thenReturn (lineAccessToken );
29
+ when (conf .getValue ("ext_plugin_line_group_id" )).thenReturn (lineGroupId );
27
30
when (conf .getBoolean (eq ("ext_plugin_line_send_alert" ), anyBoolean ())).thenReturn (true );
28
- //when(conf.getBoolean("ext_plugin_line_send_alert", false)).thenReturn(true);
29
31
30
32
AlertPack ap = genAlertPack ();
31
33
plugin .alert (ap );
You can’t perform that action at this time.
0 commit comments