示例#1
0
        public void GetAuthenticateTockenDetailsTestAuthDetailsNull()
        {
            AuthDetails authDetails = null;

            ITwitterFeedAuth _twitterFeedAuth = new TwitterFeedAuth();
            var authResponse = _twitterFeedAuth.GetAuthenticateTockenDetails(authDetails);

            Assert.AreEqual(authResponse, null);
        }
示例#2
0
        public void NullUserIdInConstructor()
        {
            AuthDetails authDetails = new AuthDetails()
            {
                ConsumerKey       = ConfigurationManager.AppSettings["authConsumerKey"],
                ConsumerSecretKey = ConfigurationManager.AppSettings["authConsumerSecret"],
                AuthURL           = ConfigurationManager.AppSettings["authUrl"]
            };

            ITwitterFeedAuth _twitterFeedAuth = new TwitterFeedAuth();
            var authResponse = _twitterFeedAuth.GetAuthenticateTockenDetails(authDetails);
        }
示例#3
0
        public void GetAuthenticateTockenDetailsTestAuthURLNull()
        {
            AuthDetails authDetails = new AuthDetails()
            {
                ConsumerKey       = ConfigurationManager.AppSettings["authConsumerKey"],
                ConsumerSecretKey = null,
                AuthURL           = ConfigurationManager.AppSettings["authUrl"]
            };

            ITwitterFeedAuth _twitterFeedAuth = new TwitterFeedAuth();
            var authResponse = _twitterFeedAuth.GetAuthenticateTockenDetails(authDetails);

            Assert.AreEqual(authResponse, null);
        }
示例#4
0
        public void GetAuthenticateTockenDetailsTest()
        {
            AuthDetails authDetails = new AuthDetails()
            {
                ConsumerKey       = ConfigurationManager.AppSettings["authConsumerKey"],
                ConsumerSecretKey = ConfigurationManager.AppSettings["authConsumerSecret"],
                AuthURL           = ConfigurationManager.AppSettings["authUrl"]
            };

            ITwitterFeedAuth _twitterFeedAuth = new TwitterFeedAuth();
            var authResponse = _twitterFeedAuth.GetAuthenticateTockenDetails(authDetails);

            Assert.IsNotNull(authDetails);
            Assert.IsTrue(authResponse.TokenType != null && authResponse.Accesstoken != null);
        }