public void GivenTheXtrasubreportEngineIsInitialized()
 {
     _controller = new DataSourceTrackingController(new EventAggregator(), _parentReport, (s, o) =>
                                                                      {
                                                                          _counter++;
                                                                          _datasources.Add(o);
                                                                      });
 }
        public void GivenTheXtrasubreportEngineIsInitializedWithDataSourceTracking()
        {



            _controller = new DataSourceTrackingController(new EventAggregator(), _parentReport, (s, ds) =>
                                                             {
                                                                 _counter++;

                                                                 Person person = null;

                                                                 ds.TryAs<Person>(p => person = p);
                                                                 ds.TryAs<List<object>>(
                                                                     list => person = (Person) list.SingleOrDefault());

                                                                 if(person != null)
                                                                     _datasources.Add(person);
                                                                 else
                                                                 {
                                                                     throw new NotImplementedException();
                                                                 }

                                                             });
        }