2
運行FsCheck你好我試圖用xunit.runner.console
運行FsCheck.Xunit
測試,並收到以下異常:如何使用的xUnit
Kata.TennisProperties.Given advantaged player when advantaged player wins score is correct [FAIL]
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
---- System.Exception : The type Kata.Tennis+Player is not handled automatically by FsCheck. Consider using another type or writing and registering a generator for it.
Stack Trace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
我試圖按照Mark Seemann's talk。我的設置如下:
我有一個單一的庫類型項目whith兩個文件。一個代碼需要測試,另一個代碼需要測試代碼。該項目編譯得很好。我沒有使用VS IDE,而是使用帶有用於F#的Ionide插件的VSCode文本編輯器。
我試過了各種設置,有和沒有FSharp.Core
nuget安裝,有和沒有版本規範FSharp.Core
。
任何想法在哪裏看得更遠?我正在用盡想法並且感到沮喪。我已經花了兩天時間了。 :)
你有回購的地方可查看嗎? –
我一直在關注這篇文章[網球卡塔](http://blog.ploeh.dk/2016/02/10/types-properties-software-designing-with-types/)。我已經按照你的要求升級了。這裏是鏈接:https://github.com/adicirstei/tennis-kata-tut – Adrian