@@ -10,7 +10,7 @@ public class PoemTomlMetadataProcessorTest(BasicFixture fixture) : IClassFixture
1010{
1111 [ Fact ]
1212 [ Trait ( "UnitTest" , "ContentImport" ) ]
13- private async Task ShouldImportTomlMetadata ( )
13+ public void ShouldImportTomlMetadata ( )
1414 {
1515 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
1616 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! ,
@@ -30,13 +30,12 @@ private async Task ShouldImportTomlMetadata()
3030 poem . VerseLength . ShouldBe ( "12" ) ;
3131 poem . Info . ShouldBeNull ( ) ;
3232 position . ShouldBe ( 0 ) ;
33- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
34- anomalies . ShouldBeEmpty ( ) ;
33+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
3534 }
3635
3736 [ Fact ]
3837 [ Trait ( "UnitTest" , "ContentImport" ) ]
39- private async Task ShouldImportSingleLineInfoTomlMetadata ( )
38+ public void ShouldImportSingleLineInfoTomlMetadata ( )
4039 {
4140 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
4241 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "12_douzieme_saison/barcarolle.md" ) ;
@@ -48,13 +47,12 @@ private async Task ShouldImportSingleLineInfoTomlMetadata()
4847 poem . Categories . First ( ) . SubCategories . Count . ShouldBe ( 1 ) ;
4948 poem . Categories . First ( ) . SubCategories . First ( ) . ShouldBe ( "Musique et chant" ) ;
5049 poem . Info . ShouldBe ( "Inspiré par l'air homonyme d'Offenbach." ) ;
51- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
52- anomalies . ShouldBeEmpty ( ) ;
50+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
5351 }
5452
5553 [ Fact ]
5654 [ Trait ( "UnitTest" , "ContentImport" ) ]
57- private async Task ShouldImportMultiLineInfoTomlMetadata ( )
55+ public void ShouldImportMultiLineInfoTomlMetadata ( )
5856 {
5957 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
6058 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "11_onzieme_saison/rester.md" ) ;
@@ -71,13 +69,12 @@ private async Task ShouldImportMultiLineInfoTomlMetadata()
7169 poem . Info . ShouldEndWith ( "hidefirstheading %}}" ) ;
7270 poem . Info . ShouldBe (
7371 $ "\" Tu es beau\" en italien.{ Environment . NewLine } { Environment . NewLine } {{{{% include \" ../../includes/trop_de_choses_auront_change\" hidefirstheading %}}}}") ;
74- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
75- anomalies . ShouldBeEmpty ( ) ;
72+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
7673 }
7774
7875 [ Fact ]
7976 [ Trait ( "UnitTest" , "ContentImport" ) ]
80- private async Task ShouldImportDoubleAcrosticheTomlMetadata ( )
77+ public void ShouldImportDoubleAcrosticheTomlMetadata ( )
8178 {
8279 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
8380 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "10_dixieme_saison/cathedrale_de_lumieres.md" ) ;
@@ -87,13 +84,12 @@ private async Task ShouldImportDoubleAcrosticheTomlMetadata()
8784 poemContentImporter . HasYamlMetadata . ShouldBeFalse ( ) ;
8885 poem . DoubleAcrostiche ! . First . ShouldBe ( "Cathédrale" ) ;
8986 poem . DoubleAcrostiche . Second . ShouldBe ( "de lumières" ) ;
90- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
91- anomalies . ShouldBeEmpty ( ) ;
87+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
9288 }
9389
9490 [ Fact ]
9591 [ Trait ( "UnitTest" , "ContentImport" ) ]
96- private async Task ShouldImportMultipleCategoriesTomlMetadata ( )
92+ public void ShouldImportMultipleCategoriesTomlMetadata ( )
9793 {
9894 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
9995 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "15_quinzieme_saison/du_gris_au_noir.md" ) ;
@@ -108,13 +104,12 @@ private async Task ShouldImportMultipleCategoriesTomlMetadata()
108104 poem . Categories . FirstOrDefault ( x => x . Name == "Saisons" ) . SubCategories . FirstOrDefault ( ) . ShouldBe ( "Automne" ) ;
109105 poem . Categories . FirstOrDefault ( x => x . Name == "Ombres et lumières" ) . SubCategories . ShouldContain ( "Ville" ) ;
110106 poem . Categories . FirstOrDefault ( x => x . Name == "Ombres et lumières" ) . SubCategories . ShouldContain ( "Crépuscule" ) ;
111- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
112- anomalies . ShouldBeEmpty ( ) ;
107+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
113108 }
114-
109+
115110 [ Fact ]
116111 [ Trait ( "UnitTest" , "ContentImport" ) ]
117- private async Task ShouldImportLovecatExtraTag ( )
112+ public void ShouldImportLovecatExtraTag ( )
118113 {
119114 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
120115 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "16_seizieme_saison/un_chat_voisin.md" ) ;
@@ -123,13 +118,12 @@ private async Task ShouldImportLovecatExtraTag()
123118 poemContentImporter . HasTomlMetadata . ShouldBeTrue ( ) ;
124119 poemContentImporter . HasYamlMetadata . ShouldBeFalse ( ) ;
125120 poem . ExtraTags . ShouldBe ( [ "lovecat" ] ) ;
126- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
127- anomalies . ShouldBeEmpty ( ) ;
121+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
128122 }
129-
123+
130124 [ Fact ]
131125 [ Trait ( "UnitTest" , "ContentImport" ) ]
132- private async Task ShouldImportLocations ( )
126+ public void ShouldImportLocations ( )
133127 {
134128 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
135129 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "12_douzieme_saison/pelerinage.md" ) ;
@@ -138,15 +132,14 @@ private async Task ShouldImportLocations()
138132 poemContentImporter . HasTomlMetadata . ShouldBeTrue ( ) ;
139133 poemContentImporter . HasYamlMetadata . ShouldBeFalse ( ) ;
140134 poem . Locations . ShouldBe ( [ "Reims" ] ) ;
141- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
142- anomalies . ShouldBeEmpty ( ) ;
135+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
143136 }
144137
145138 [ Theory ]
146139 [ Trait ( "UnitTest" , "Computation" ) ]
147140 [ InlineData ( "categories = [\" First\" , \" Here and there\" ]" ) ]
148141 [ InlineData ( "categories = [ \" First\" , \" Here and there\" ]" ) ]
149- private void ShouldProperlyParseCategories ( string categoriesLine )
142+ public void ShouldProperlyParseCategories ( string categoriesLine )
150143 {
151144 var processor = new PoemTomlMetadataProcessor ( ) ;
152145 processor . BuildCategories ( categoriesLine ) ;
@@ -155,7 +148,7 @@ private void ShouldProperlyParseCategories(string categoriesLine)
155148
156149 [ Fact ]
157150 [ Trait ( "UnitTest" , "Computation" ) ]
158- private void ShouldProperlyParseInfoWithQuotes ( )
151+ public void ShouldProperlyParseInfoWithQuotes ( )
159152 {
160153 var info = "info = \" It is a \\ \" quoted text\\ \" \" " ;
161154 var processor = new PoemTomlMetadataProcessor ( ) ;
@@ -165,7 +158,7 @@ private void ShouldProperlyParseInfoWithQuotes()
165158
166159 [ Fact ]
167160 [ Trait ( "UnitTest" , "ContentImport" ) ]
168- private async Task ShouldImportPictures ( )
161+ public void ShouldImportPictures ( )
169162 {
170163 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
171164 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "17_dix_septieme_saison/une_derniere_visite.md" ) ;
@@ -176,13 +169,12 @@ private async Task ShouldImportPictures()
176169 poem . Pictures . ShouldNotBeNull ( ) ;
177170 poem . Pictures . Count . ShouldBe ( 4 ) ;
178171 poem . Pictures [ 0 ] . ShouldBe ( "Le puits du château de Ham-sous-Varsberg" ) ;
179- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
180- anomalies . ShouldBeEmpty ( ) ;
172+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
181173 }
182174
183175 [ Fact ]
184176 [ Trait ( "UnitTest" , "ContentImport" ) ]
185- private async Task ShouldImportVariableVerseTomlMetadata ( )
177+ public void ShouldImportVariableVerseTomlMetadata ( )
186178 {
187179 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
188180 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "17_dix_septieme_saison/a_quai.md" ) ;
@@ -194,28 +186,26 @@ private async Task ShouldImportVariableVerseTomlMetadata()
194186 poem . DetailedMetric . ShouldBe ( "5, 2" ) ;
195187 // Because it has been copied from DetailedVerseLength by poemContentImporter.
196188 poem . VerseLength . ShouldBe ( "5, 2" ) ;
197- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
198- anomalies . ShouldBeEmpty ( ) ;
189+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
199190 }
200-
191+
201192 [ Fact ]
202193 [ Trait ( "UnitTest" , "ContentImport" ) ]
203- private async Task ShouldImportMultilineTags ( )
194+ public void ShouldImportMultilineTags ( )
204195 {
205196 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
206197 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "21_vingt_et_unieme_saison/le_jour_decroit.md" ) ;
207198 var poemContentImporter = new PoemImporter ( fixture . Configuration ) ;
208199 var ( poem , _) = poemContentImporter . Import ( poemContentFilePath ) ;
209200 poemContentImporter . HasTomlMetadata . ShouldBeTrue ( ) ;
210201 poemContentImporter . HasYamlMetadata . ShouldBeFalse ( ) ;
211- poem . ExtraTags . ShouldBeEquivalentTo ( new List < string > { "refrain" , "les mois" } ) ;
212- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
213- anomalies . ShouldBeEmpty ( ) ;
202+ poem . ExtraTags . ShouldBeEquivalentTo ( new List < string > { "refrain" , "les mois" } ) ;
203+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
214204 }
215-
205+
216206 [ Fact ]
217207 [ Trait ( "UnitTest" , "ContentImport" ) ]
218- private async Task ShouldImportDescription ( )
208+ public void ShouldImportDescription ( )
219209 {
220210 var poemContentFilePath = Path . Combine ( Directory . GetCurrentDirectory ( ) ,
221211 fixture . Configuration [ Constants . CONTENT_ROOT_DIR ] ! , "3_troisieme_saison/est_ce_un_automne.md" ) ;
@@ -224,8 +214,6 @@ private async Task ShouldImportDescription()
224214 poemContentImporter . HasTomlMetadata . ShouldBeTrue ( ) ;
225215 poemContentImporter . HasYamlMetadata . ShouldBeFalse ( ) ;
226216 poem . Description . ShouldBe ( "Est-ce un automne, est-ce un printemps / Qui dans mon cœur se renouvelle" ) ;
227- var anomalies = await poemContentImporter . VerifyAnomaliesAfterImportAsync ( ) ;
228- anomalies . ShouldBeEmpty ( ) ;
217+ poemContentImporter . VerifyAnomaliesAfterImport ( ) ;
229218 }
230-
231- }
219+ }
0 commit comments