File tree 5 files changed +3
-34
lines changed
main/java/com/iluwatar/publishsubscribe
test/java/com/iluwatar/publishsubscribe
5 files changed +3
-34
lines changed Original file line number Diff line number Diff line change 58
58
<sonar .projectName>Java Design Patterns</sonar .projectName>
59
59
</properties >
60
60
<modules >
61
+ <module >publish-subscribe</module >
61
62
<module >abstract-factory</module >
62
63
<module >collecting-parameter</module >
63
64
<module >monitor</module >
Original file line number Diff line number Diff line change 35
35
<artifactId >java-design-patterns</artifactId >
36
36
<version >1.26.0-SNAPSHOT</version >
37
37
</parent >
38
- <artifactId >publishsubscribe </artifactId >
38
+ <artifactId >publish-subscribe </artifactId >
39
39
40
40
<dependencies >
41
41
<dependency >
42
42
<groupId >org.junit.jupiter</groupId >
43
43
<artifactId >junit-jupiter-api</artifactId >
44
44
<scope >test</scope >
45
45
</dependency >
46
- <dependency >
47
- <groupId >org.mockito</groupId >
48
- <artifactId >mockito-core</artifactId >
49
- <scope >test</scope >
50
- </dependency >
51
46
<dependency >
52
47
<groupId >org.apache.activemq</groupId >
53
48
<artifactId >activemq-core</artifactId >
54
49
<version >5.7.0</version >
55
50
</dependency >
56
- <dependency >
57
- <groupId >org.apache.xbean</groupId >
58
- <artifactId >xbean-spring</artifactId >
59
- <version >4.24</version >
60
- </dependency >
61
- <dependency >
62
- <groupId >org.apache.activemq.tooling</groupId >
63
- <artifactId >activemq-junit</artifactId >
64
- <version >6.1.1</version >
65
- <scope >test</scope >
66
- </dependency >
67
51
</dependencies >
68
52
69
53
</project >
Original file line number Diff line number Diff line change 1
1
package com .iluwatar .publishsubscribe ;
2
2
3
3
import lombok .extern .slf4j .Slf4j ;
4
- import org .slf4j .event .Level ;
5
4
import javax .jms .BytesMessage ;
6
5
import javax .jms .JMSException ;
7
6
import javax .jms .Message ;
@@ -25,7 +24,7 @@ public class Borrower implements MessageListener {
25
24
private TopicConnection tConnection ;
26
25
private TopicSession tSession ;
27
26
private Topic topic ;
28
- private double currentRate ;
27
+ private final double currentRate ;
29
28
private static final String ERROR = "An error has occured!" ;
30
29
private double newRate ;
31
30
Original file line number Diff line number Diff line change 1
1
package com .iluwatar .publishsubscribe ;
2
2
3
- import org .apache .activemq .Message ;
4
- import org .apache .activemq .broker .Broker ;
5
3
import org .apache .activemq .broker .BrokerService ;
6
- import org .apache .activemq .command .ActiveMQTextMessage ;
7
4
import org .junit .jupiter .api .AfterAll ;
8
5
import org .junit .jupiter .api .Assertions ;
9
6
import org .junit .jupiter .api .BeforeAll ;
10
- import org .junit .jupiter .api .BeforeEach ;
11
7
import org .junit .jupiter .api .Test ;
12
8
import javax .jms .BytesMessage ;
13
9
import javax .jms .JMSException ;
14
- import javax .jms .TextMessage ;
15
- import java .io .BufferedOutputStream ;
16
- import java .io .ByteArrayOutputStream ;
17
- import java .io .OutputStream ;
18
- import java .io .PrintStream ;
19
- import java .sql .SQLOutput ;
20
-
21
- import static org .mockito .Mockito .mock ;
22
- import static org .mockito .Mockito .when ;
23
10
24
11
public class BorrowerTest {
25
12
Original file line number Diff line number Diff line change 2
2
3
3
import org .apache .activemq .broker .BrokerService ;
4
4
import org .junit .jupiter .api .AfterAll ;
5
- import org .junit .jupiter .api .AfterEach ;
6
5
import org .junit .jupiter .api .Assertions ;
7
6
import org .junit .jupiter .api .BeforeAll ;
8
- import org .junit .jupiter .api .BeforeEach ;
9
7
import org .junit .jupiter .api .Test ;
10
8
11
9
public class LenderTest {
You can’t perform that action at this time.
0 commit comments