Exemplo n.º 1
0
        public void Setup()
        {
            Initialise();

            _sentiment = SentimentResponseBuilder.Build.AnInstance();
            _tweet     = TweetBuilder.Build.AnInstance();

            _result = SentimentTweetMapper.MapFor(_sentiment, _tweet);
        }
Exemplo n.º 2
0
        public void Setup()
        {
            Initialise();

            _tweet = TweetBuilder.Build.AnInstance();

            _sentimentReponse = SentimentResponseBuilder.Build.AnInstance();
            SentimentApiAdapter
            .Setup(x => x.GetSentiment(_tweet))
            .Returns(Task.FromResult(_sentimentReponse));

            _sentimentTweet = SentimentTweetBuilder.Build.AnInstance();
            SentimentTweetMapper
            .Setup(x => x.MapFor(_sentimentReponse, _tweet))
            .Returns(_sentimentTweet);

            _result = Controller.GetSentiment(_tweet).Result;
        }