This is a migrated thread and some comments may be shown as answers.

An interface for mocking

1 Answer 38 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
Masoud
Top achievements
Rank 1
Masoud asked on 16 Jan 2012, 06:31 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 17 Jan 2012, 10:15 AM
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 >>

Tags
DomainDataSource
Asked by
Masoud
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or