An interface for mocking

2 posts, 1 answers
  1. Masoud
    Masoud avatar
    61 posts
    Member since:
    Aug 2011

    Posted 16 Jan 2012 Link to this post

    Hi there,

    I am currently working with QueryableDomainServiceCollectionView within MVVM and finding it great.  Thank you for this product!!  Would it be possible to define an Generic IQueryableDomainServiceCollectionView Interface that is implemented by QueryableDomainServiceCollectionView ?  This would make it possible to mock QDSCV for my unit tests and make my MVVM experience complete!!    

    Thank you for your help

  2. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 17 Jan 2012 Link to this post

    Hello,

    I am afraid that we cannot cover the entire QDSCV functionality in a single interface, since it actually implements 11 different interfaces (through its base classes)  if you take a look at it with Reflector:

    IEnumerable<TEntity>
    IEnumerable
    INotifyCollectionChanged
    ICollectionView
    INotifyPropertyChanged
    IPagedCollectionView
    IDisposable
    IWeakEventListener<NotifyCollectionChangedEventArgs>
    IWeakEventListener<CurrentChangingEventArgs>
    IEditableCollectionViewAddNewItem
    IQueryableCollectionView

    So it is not feasible to create a new interface that will include all of the above. 

    Regards,

    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top