PSClassUtils icon indicating copy to clipboard operation
PSClassUtils copied to clipboard

Write-CUPesterTests.ps1 : error in the pester file with ENUM

Open LaurentLienhard opened this issue 6 years ago • 2 comments

In my class I use an ENUM "company" which is stored in a ps1 file. In the file pester during the test "It '[User] - [Constructor]" he expects a parameter of the type COMPANY but he does not know this type since for the test he does not load my file with my ENUM      + [COMPANY] $ Company      + ~~~~~~~      Unable to find type [COMPANY] I don't know if I'm clear :-)

LaurentLienhard avatar Feb 04 '19 14:02 LaurentLienhard

Salutations

I have some difficulties to understand 100%. Can you please send a code extract and / or a screen shot of your file strucutre (If necessare of course)

Stephanevg avatar Feb 04 '19 23:02 Stephanevg

capture d ecran 2019-02-05 a 20 09 54 My Structure is like this capture d ecran 2019-02-05 a 20 10 05 and in my enum folder i have this When i use Write-CUPesterTests.ps1 it makes 1 pester for my class USER for example. In this class i use a parameter based on my enum Enum.Entite.ps1. In the pester file it don't know my enum file so test failed Understand ?

LaurentLienhard avatar Feb 05 '19 19:02 LaurentLienhard