You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have a method in your class and in return value you put [System.String] or [System.Int32] (probably the others too) if you generate the tests pester it puts errors when you play them
Describing [Date]-[Methods]
[-] [Date] --> MethodTest($Message) : [System.String] - should return type [System.String]
Expected strings to be the same, but they were different.
Expected length: 13
Actual length: 6
Strings differ at index 1.
Expected: 'System.String'
But was: 'String'
83: ($Instance.MethodTest($Message)).GetType().Name | should be System.String
in the pester file you have
#Public Method
It '[Date] --> MethodTest($Message) : [System.String] - should return type [System.String]' {
# -- Arrange
[System.String]$Message = "test"
# -- Act
$Instance = [Date]::New()
# -- Assert
($Instance.MethodTest($Message)).GetType().Name | should be System.String
} #End It Block`
I think that the solution would be to add in the Write-CUPesterTest a transformation so that if it finds [System.XXXX] it transforms it into [XXXX] in pester test
The text was updated successfully, but these errors were encountered:
When you have a method in your class and in return value you put [System.String] or [System.Int32] (probably the others too) if you generate the tests pester it puts errors when you play them
in the pester file you have
and my method is
Actually, the return is a String type and not [System.String]
I think that the solution would be to add in the Write-CUPesterTest a transformation so that if it finds [System.XXXX] it transforms it into [XXXX] in pester test
The text was updated successfully, but these errors were encountered: