Stephanevg / PSClassUtils

A set of utilities to work with Powershell Classes
http://powershelldistrict.com/how-to-generate-a-uml-diagram-using-powershell/
93 stars 23 forks source link

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

Open LaurentLienhard opened 5 years ago

LaurentLienhard commented 5 years ago

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 :-)

Stephanevg commented 5 years ago

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)

LaurentLienhard commented 5 years ago

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 ?