Exemple #1
0
        private BaiduSession LoginBaidu(bool isInternal)
        {
            var service = new AuthorizationService();
            var session = BaiduSession.CreateDefault(isInternal);

            service.GetAccessToken(session);
            return(session);
        }
        public void _01_ShouldGetAccessToken()
        {
            var service = new AuthorizationService();
            var session = BaiduSession.CreateDefault();

            service.GetAccessToken(session);

            Assert.IsFalse(string.IsNullOrEmpty(session.AccessToken));
        }