@@ -229,6 +229,9 @@ public async Task TestGetTemplateVersionByIdAsync()
229229
230230 // Validate the response
231231 SendwithusClientTest . ValidateResponse ( templateVersion ) ;
232+
233+ // Check for presence of expected fields
234+ Assert . AreEqual ( templateVersion . preheader , "A preheader test" ) ;
232235 }
233236 catch ( AggregateException exception )
234237 {
@@ -251,6 +254,9 @@ public async Task TestGetTemplateVersionByIdAndLocaleAsync()
251254
252255 // Validate the response
253256 SendwithusClientTest . ValidateResponse ( templateVersion ) ;
257+
258+ // Check for presence of expected fields
259+ Assert . AreEqual ( templateVersion . preheader , "A preheader test" ) ;
254260 }
255261 catch ( AggregateException exception )
256262 {
@@ -272,6 +278,7 @@ public async Task TestUpdateTemplateVersionByIdWithAllParametersAsync()
272278 var updatedTemplateVersion = new TemplateVersion ( templateVersionName , templateSubject ) ;
273279 updatedTemplateVersion . html = "<html><head></head><body><h1>NEW TEMPLATE VERSION</h1></body></html>" ;
274280 updatedTemplateVersion . text = "some text" ;
281+ updatedTemplateVersion . preheader = "A Test Preheader" ;
275282 try
276283 {
277284 var templateVersion = await Template . UpdateTemplateVersionAsync ( DEFAULT_TEMPLATE_ID , DEFAULT_VERSION_ID , updatedTemplateVersion ) ;
@@ -403,6 +410,7 @@ public async Task TestUpdateTemplateVersionByIdAndLocaleWithAllParametersAsync()
403410 var updatedTemplateVersion = new TemplateVersion ( templateVersionName , templateSubject ) ;
404411 updatedTemplateVersion . html = "<html><head></head><body><h1>UPDATE</h1></body></html>" ;
405412 updatedTemplateVersion . text = "sometext" ;
413+ updatedTemplateVersion . preheader = "A Test Preheader" ;
406414 try
407415 {
408416 var templateVersion = await Template . UpdateTemplateVersionAsync ( DEFAULT_TEMPLATE_ID , DEFAULT_LOCALE , DEFAULT_VERSION_ID , updatedTemplateVersion ) ;
@@ -510,6 +518,7 @@ public async Task TestAddLocaleToTemplateWithAllParmetersAsync()
510518 var updatedTemplateVersion = new TemplateVersion ( templateVersionName , templateSubject ) ;
511519 updatedTemplateVersion . html = "<html><head></head><body><h1>Nouveau modèle!</h1></body></html>" ;
512520 updatedTemplateVersion . text = "un texte" ;
521+ updatedTemplateVersion . preheader = "A French Preheader" ;
513522
514523 try
515524 {
@@ -590,6 +599,7 @@ public async Task TestCreateTemplateVersionWithAllParametersAsync()
590599 var updatedTemplateVersion = new TemplateVersion ( templateVersionName , templateSubject ) ;
591600 updatedTemplateVersion . html = "<html><head></head><body><h1>NEW TEMPLATE VERSION</h1></body></html>" ;
592601 updatedTemplateVersion . text = "some text" ;
602+ updatedTemplateVersion . preheader = "A Test Preheader" ;
593603 try
594604 {
595605 var templateVersion = await Template . CreateTemplateVersion ( DEFAULT_TEMPLATE_ID , updatedTemplateVersion ) ;
@@ -669,6 +679,7 @@ public async Task TestCreateTemplateVersionWithLocaleWithAllParametersAsync()
669679 var updatedTemplateVersion = new TemplateVersion ( templateVersionName , templateSubject ) ;
670680 updatedTemplateVersion . html = "<html><head></head><body><h1>NEW TEMPLATE VERSION</h1></body></html>" ;
671681 updatedTemplateVersion . text = "some text" ;
682+ updatedTemplateVersion . preheader = "A Test Preheader" ;
672683 try
673684 {
674685 var templateVersion = await Template . CreateTemplateVersion ( DEFAULT_TEMPLATE_ID , DEFAULT_LOCALE , updatedTemplateVersion ) ;
@@ -747,6 +758,7 @@ public static async Task<Template> BuildAndSendCreateTemplateRequestWithAllParam
747758 updatedTemplateVersion . html = "<html><head></head><body><h1>NEW TEMPLATE VERSION</h1></body></html>" ;
748759 updatedTemplateVersion . text = "some text" ;
749760 updatedTemplateVersion . locale = DEFAULT_LOCALE ;
761+ updatedTemplateVersion . preheader = "Test Preheader" ;
750762 return await Template . CreateTemplateAsync ( updatedTemplateVersion ) ;
751763 }
752764
0 commit comments