ebenezergraham commented on a change in pull request #11: Thymeleaf templating 
for Email
URL: 
https://github.com/apache/fineract-cn-notifications/pull/11#discussion_r287134805
 
 

 ##########
 File path: 
component-test/src/main/java/org/apache/fineract/cn/notification/TestEmailService.java
 ##########
 @@ -63,9 +67,42 @@ public void shouldSendAnEmail() throws 
InterruptedException, IOException {
                
                notificationService.sendEmail(
                                TEST_ADDRESS,
-                               "sample",
-                               null
-                               );
+                               TEST_TEMPLATE,
+                               null);
+               
Assert.assertTrue(this.eventRecorder.wait(NotificationEventConstants.POST_SEND_EMAIL_NOTIFICATION,TEST_ADDRESS
 ));
+       }
+       
+       @Test
+       public void shouldSendFormattedEmail() throws InterruptedException, 
IOException {
+               this.logger.info("Send Email Notification");
+               final TemplateImporter importer = new 
TemplateImporter(testSubject, logger);
+               final URL uri = 
ClassLoader.getSystemResource("importdata/test-templates.csv");
+               importer.importCSV(uri);
+               
+               
//Assert.assertTrue(eventRecorder.wait(NotificationEventConstants.POST_TEMPLATE,
 "sample"));
 
 Review comment:
   @awasum I need help here. I am trying to assert that a Post Template action 
has occurred in my component test. I have verified that the event has been 
emitted but the event never gets recorded in the event recorder even though the 
command has been executed and the object has been created when I inspect the 
keyspace. 
   
   
   01:22:12.458 [main] INFO  event-recorder-logger - Waited 30001 milliseconds, 
and event post-template with payload sample wasn't observed
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to