From f73463aa414b1ea1d0182d8b5078f152b734d175 Mon Sep 17 00:00:00 2001 From: Laurent LIENHARD Date: Mon, 5 Aug 2019 10:04:26 +0200 Subject: [PATCH] update in dev branch --- Code/Functions/Public/Write-CUPesterTest.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Code/Functions/Public/Write-CUPesterTest.ps1 b/Code/Functions/Public/Write-CUPesterTest.ps1 index f037171..34e7865 100644 --- a/Code/Functions/Public/Write-CUPesterTest.ps1 +++ b/Code/Functions/Public/Write-CUPesterTest.ps1 @@ -426,8 +426,11 @@ Function Write-CUPesterTest { [void]$sb.AppendLine("$MethodCall" + '| Should -Be $null') } else { - - [void]$sb.AppendLine("($MethodCall).GetType().Name | Should -Be $ReturnType") + if ($Method.ReturnType -like "*System.*") { + [void]$sb.AppendLine("($MethodCall).GetType().FullName | should be $ReturnType") + }else { + [void]$sb.AppendLine("($MethodCall).GetType().Name | should be $ReturnType") + } }