0
the Unit testing Nuget package을 사용하여 WF4 서비스를 테스트하고 있습니다. 테스트가 끝나는 추적 정보에 물건이 있거나 존재하지 않는다고 주장하는 기능이 있습니다. 단위 테스트 후 워크 플로 추적에서 활동 수를 어설 션하는 방법은 무엇입니까?
는 다음 단위 테스트 코드를 살펴 보자 :WorkflowServiceTestHost host = null;
using (host = CreateHost())
{
var proxy = new ServiceClient(Binding, ServiceAddress);
// Call receive points in the workflow
}
finally
{
host.Tracking.Trace();
// I would like to assert stuff like the WF did not abort
// For now, I would just like to assert that there are a
// certain number of invocations of a specific activity.
// I can find no examples of how to call this:
host.Tracking.Assert.ExistsCount(?????what goes here???);
}
어떻게 전화 ExistsCount()
합니까?
public void ExistsCount<TRecord>(Predicate<TRecord> predicate, int count, string message = null) where TRecord : TrackingRecord
하지만 난 predicate
예상되는 이해하는 것이 더 예 또는 문서를 찾을 수 없습니다 : 프로토 타입은 다음과 같습니다.