private async void ExecuteMoreTweetsCommand(Tweet lastTweet)
        {
            if (_isLoadingMore || Tweets.Count == 0 || IsNoMoreTweets)
            {
                return;
            }

            if (lastTweet.Equals(Tweets.Last()))
            {
                _isLoadingMore = true;

                await GetTweets();

                _isLoadingMore = false;
            }
        }
Esempio n. 2
0
        public void AddMethodReturnsItemAdded()
        {
            // Arrange
            var   sut    = new TweetBrowserVirtualDataStore();
            var   testId = "09113456";
            Tweet tweet  = new Tweet()
            {
                Id    = testId,
                Stamp = "2018/3/24 01:15 AM",
                Text  = "Test message"
            };

            // Act
            var item = sut.Add(tweet);

            Assert.That(tweet.Equals(item));
        }
Esempio n. 3
0
        public void AddMethodAddsItemToCollection()
        {
            // Arrange
            var   sut    = new TweetBrowserVirtualDataStore();
            var   testId = "09113456";
            Tweet tweet  = new Tweet()
            {
                Id    = testId,
                Stamp = "2018/3/24 01:15 AM",
                Text  = "Test message"
            };

            // Act
            sut.Add(tweet);
            var item = sut.AllItems.FirstOrDefault(t => t.Id == testId);

            Assert.That(tweet.Equals(item));
        }