Example #1
0
        public void GetToken_Works()
        {
            //frob = "936a17ea23d09ce2e5a5dd645474e517";
            Assert.IsNotEmpty(frob);

            var auth = new Auth(ApiKey, Secret);
            token = auth.GetToken(frob);
            Debug.WriteLine(token.Token);
        }
Example #2
0
        public void GetFrob_Works()
        {
            var auth = new Auth(ApiKey, Secret);
            frob = auth.GetFrob();
            var authUri = auth.GenerateAuthenticationUri(frob);

            Process.Start(authUri.AbsoluteUri);
            Debug.WriteLine(authUri.ToString());
        }
Example #3
0
        public void GetFrob_Works2()
        {
            var network = new Mock<INetwork>();
            var good = "";
            network.Setup(n => n.GetResponse(It.Is<string>(uri => uri == ""))).Returns(new StringReader(GoodFrob));

            var auth = new Auth(ApiKey, Secret);
            var frob = auth.GetFrob();

            Assert.AreEqual("6789", frob);
        }