Exemple #1
0
        public void BeforeEach()
        {
            _rowViewModelFactoryMock = new Mock<IRowViewModelFactory<TrackableModel, ITrackableViewModel>>();
            _rowViewModelFactoryMock.Setup(f => f.Create(It.IsAny<TrackableModel>())).Returns<TrackableModel>(m => new TrackableViewModel(m));

            _tracker = new Tracker<TrackableModel, ITrackableViewModel>(_rowViewModelFactoryMock.Object);

            var models = new Collection<TrackableModel>
            {
                new TrackableModel("test1", 1),
                new TrackableModel("test2", 2),
                new TrackableModel("test3", 3),
                new TrackableModel("test4", 4)
            };

            _rows = _tracker.ConvertAndTrack(models);
        }