Example #1
0
        public async void when_user_sign_in_with_twitter()
        {
            var account = await GetNewTwitterAccount();

            var sut      = new AuthServiceClient(BaseUrl, null, new DummyPackageInfo(), null, null);
            var response = await sut.AuthenticateTwitter(account.TwitterId);

            Assert.IsNotNull(response);
            Assert.IsNotNull(response.SessionId, "Test");
            Assert.AreEqual(account.TwitterId, response.UserName);
        }
Example #2
0
        public void when_user_sign_in_with_invalid_twitter_id()
        {
            var sut = new AuthServiceClient(BaseUrl, null, new DummyPackageInfo(), null, null);

            Assert.Throws <WebServiceException>(async() => await sut.AuthenticateTwitter(Guid.NewGuid().ToString()), "Invalid UserName or Password");
        }