@ -439,13 +439,13 @@ namespace EPAServeur.Tests.Services
#region Tests GetFormationsCountAsync
[TestCase(1, new int[] { 1 , 2 , 3 } , 1 , 5 , "formation" , "2020-09-30" , "2020-11-30" ) ]
[TestCase(1, new int[] { 1 } , 1 , 5 , "Formation Mainframe Complète" , null , null ) ]
[TestCase(null, null, 2, 10, null, null, null)]
[TestCase(null, new int[] { 1 } , 1 , 1 0 , null , null , null ) ]
[TestCase(1, null, 1, 10, "for", null, null)]
[TestCase(1, new int[] { } , 1 , 1 0 , "for" , null , null ) ]
public async Task GetFormationsCountAsync_PasseDesParamsValides_RetourneLeNombreTotalDeFormations ( long? idAgence , int [ ] arrIdStatuts , int? numPage , int? parPAge , string texte , DateTime ? dateDebut , DateTime ? dateFin )
[TestCase(1, new int[] { 1 , 2 , 3 } , "formation" , "2020-09-30" , "2020-11-30" ) ]
[TestCase(1, new int[] { 1 } , "Formation Mainframe Complète" , null , null ) ]
[TestCase(null, null, null, null, null)]
[TestCase(null, new int[] { 1 } , null , null , null ) ]
[TestCase(1, null, "for", null, null)]
[TestCase(1, new int[] { } , "for" , null , null ) ]
public async Task GetFormationsCountAsync_PasseDesParamsValides_RetourneLeNombreTotalDeFormations ( long? idAgence , int [ ] arrIdStatuts , string texte , DateTime ? dateDebut , DateTime ? dateFin )
{
// Arrange
FormationService formationService = new FormationService ( epContext , collaborateurService ) ;
@ -457,16 +457,16 @@ namespace EPAServeur.Tests.Services
idStatuts = null ;
// Act
long count = await formationService . GetFormationsCountAsync ( idAgence , idStatuts , numPage , parPAge , texte , dateDebut , dateFin ) ;
long count = await formationService . GetFormationsCountAsync ( idAgence , idStatuts , texte , dateDebut , dateFin ) ;
// Assert
Assert . Less ( 0 , count ) ;
}
[TestCase(1, new int[] { 1 } , 1 , 1 5 , "azerty" , null , null ) ]
[TestCase(-1, new int[] { - 1 } , - 1 , - 1 , "azerty" , null , null ) ]
[TestCase(0, new int[] { 0 } , 0 , 0 , null , null , null ) ]
public async Task GetFormationsCountAsync_PasseDesParamsInvalides_RetourneZero ( long? idAgence , int [ ] arrIdStatuts , int? numPage , int? parPAge , string texte , DateTime ? dateDebut , DateTime ? dateFin )
[TestCase(1, new int[] { 1 } , "azerty" , null , null ) ]
[TestCase(-1, new int[] { - 1 } , "azerty" , null , null ) ]
[TestCase(0, new int[] { 0 } , null , null , null ) ]
public async Task GetFormationsCountAsync_PasseDesParamsInvalides_RetourneZero ( long? idAgence , int [ ] arrIdStatuts , string texte , DateTime ? dateDebut , DateTime ? dateFin )
{
// Arrange
FormationService formationService = new FormationService ( epContext , collaborateurService ) ;
@ -478,7 +478,7 @@ namespace EPAServeur.Tests.Services
idStatuts = null ;
// Act
long count = await formationService . GetFormationsCountAsync ( idAgence , idStatuts , numPage , parPAge , texte , dateDebut , dateFin ) ;
long count = await formationService . GetFormationsCountAsync ( idAgence , idStatuts , texte , dateDebut , dateFin ) ;
// Assert
Assert . AreEqual ( 0 , count ) ;