Unit testing a custom KnowledgeSyncProvider RRS feed

  • Question

  • Greetings,

    I'm in the middle of a custom sync provider based on KnowledgeSyncProvider. I'm attempting to finish the unit tests. One problem spot specifically is testing ProcessChangeBatch on the destination. In that method, I use NotifyingChangeApplier. NotifyingChangeApplier.ApplyChanges throws an InvalidOperationException when the syncSessionContext parameter is null. I cannot make a mock SyncSessionContext instance since that class's constructor is marked internal.

    Any suggestions on how I could unit test this method?

    • Moved by Max Wang_1983 Thursday, April 21, 2011 1:20 AM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Thursday, July 9, 2009 1:01 AM

All replies

  • The method is now public (v 2.0 CTP2). You could use .net reflection methods to create an instance?
    Monday, July 13, 2009 7:12 PM
  • Thanks Sid,

    Yea, that would be a big help. I'm a bit confused about the state of the release, however, as I need to also use MSF for devices. Is v2 compatible with my v1 device provider? Is v2 for devices out?
    Monday, July 13, 2009 8:27 PM
  • Hi,
    We are currently working on the device release for MSF V2. Current plan is to have the device for MSF V2 release in the 2nd half of this year. Please check our announcements regularly here in this forum for any updates.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, July 14, 2009 12:05 AM
  • Thanks Yunwen -

    Any chance there is a CTP or a TAP access sooner? I'd be happy to provide feedback.

    Tuesday, July 14, 2009 1:05 AM