File tree Expand file tree Collapse file tree 5 files changed +3
-34
lines changed 
main/java/com/iluwatar/publishsubscribe 
test/java/com/iluwatar/publishsubscribe Expand file tree Collapse file tree 5 files changed +3
-34
lines changed Original file line number Diff line number Diff line change 5858    <sonar .projectName>Java Design Patterns</sonar .projectName>
5959  </properties >
6060  <modules >
61+     <module >publish-subscribe</module >
6162    <module >abstract-factory</module >
6263    <module >collecting-parameter</module >
6364    <module >monitor</module >
Original file line number Diff line number Diff line change 3535        <artifactId >java-design-patterns</artifactId >
3636        <version >1.26.0-SNAPSHOT</version >
3737    </parent >
38-     <artifactId >publishsubscribe </artifactId >
38+     <artifactId >publish-subscribe </artifactId >
3939
4040    <dependencies >
4141        <dependency >
4242            <groupId >org.junit.jupiter</groupId >
4343            <artifactId >junit-jupiter-api</artifactId >
4444            <scope >test</scope >
4545        </dependency >
46-         <dependency >
47-             <groupId >org.mockito</groupId >
48-             <artifactId >mockito-core</artifactId >
49-             <scope >test</scope >
50-         </dependency >
5146        <dependency >
5247            <groupId >org.apache.activemq</groupId >
5348            <artifactId >activemq-core</artifactId >
5449            <version >5.7.0</version >
5550        </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 >
6751    </dependencies >
6852
6953</project >
Original file line number Diff line number Diff line change 11package  com .iluwatar .publishsubscribe ;
22
33import  lombok .extern .slf4j .Slf4j ;
4- import  org .slf4j .event .Level ;
54import  javax .jms .BytesMessage ;
65import  javax .jms .JMSException ;
76import  javax .jms .Message ;
@@ -25,7 +24,7 @@ public class Borrower implements MessageListener {
2524  private  TopicConnection  tConnection ;
2625  private  TopicSession  tSession ;
2726  private  Topic  topic ;
28-   private  double  currentRate ;
27+   private  final   double  currentRate ;
2928  private  static  final  String  ERROR  = "An error has occured!" ;
3029  private  double  newRate ;
3130
Original file line number Diff line number Diff line change 11package  com .iluwatar .publishsubscribe ;
22
3- import  org .apache .activemq .Message ;
4- import  org .apache .activemq .broker .Broker ;
53import  org .apache .activemq .broker .BrokerService ;
6- import  org .apache .activemq .command .ActiveMQTextMessage ;
74import  org .junit .jupiter .api .AfterAll ;
85import  org .junit .jupiter .api .Assertions ;
96import  org .junit .jupiter .api .BeforeAll ;
10- import  org .junit .jupiter .api .BeforeEach ;
117import  org .junit .jupiter .api .Test ;
128import  javax .jms .BytesMessage ;
139import  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 ;
2310
2411public  class  BorrowerTest  {
2512
Original file line number Diff line number Diff line change 22
33import  org .apache .activemq .broker .BrokerService ;
44import  org .junit .jupiter .api .AfterAll ;
5- import  org .junit .jupiter .api .AfterEach ;
65import  org .junit .jupiter .api .Assertions ;
76import  org .junit .jupiter .api .BeforeAll ;
8- import  org .junit .jupiter .api .BeforeEach ;
97import  org .junit .jupiter .api .Test ;
108
119public  class  LenderTest  {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments