示例#1
0
        public void SetUp()
        {
            feedAPIMock       = new Mock <IFeedAPI>();
            feedConversorMock = new Mock <IFeedTopicsFromXml>();

            feedConversorMock.Setup(m => m.GetFeedTopics(null)).Returns(new List <FeedTopic>());

            _feedServices = new FeedServices(feedAPIMock.Object, feedConversorMock.Object);
        }
示例#2
0
        private void prepareMockToReturnMoreThan10FeedTopics()
        {
            var feedTopics = new List <FeedTopic>();

            for (int i = 0; i < 11; i++)
            {
                feedTopics.Add(new FeedTopic("Sample Topic " + i));
            }

            feedConversorMock.Setup(m => m.GetFeedTopics(null)).Returns(feedTopics);

            _feedServices = new FeedServices(feedAPIMock.Object, feedConversorMock.Object);
        }
示例#3
0
        public DashboardViewModel(IFeedServices feedServices, ITaskDispatcher dispatcher)
        {
            FeedServices = feedServices;
            Dispatcher   = dispatcher;

            ListItems = new ObservableCollection <DashboardSideItemViewModel>();

            LoadData();

            var dispatcherTimer = new System.Windows.Threading.DispatcherTimer();

            dispatcherTimer.Tick += (a, b) => {
                CycleImages();
            };
            dispatcherTimer.Interval = new TimeSpan(0, 0, 5);
            dispatcherTimer.Start();
        }
 public FeedDataController(IFeedServices feedServices)
 {
     _feedServices = feedServices;
 }
示例#5
0
 public FeedServicesTests()
 {
     _feedServices = new FeedServices();
 }