public void TestAuthenticationFactory()
        {
            var basicAuth = AuthenticatorFactory.CreateBasicAuthenticator("username", "password");

            Assert.IsNotNull(basicAuth);
            Assert.IsTrue(basicAuth is BasicAuthenticator);

            var facebookAuth = AuthenticatorFactory.CreateFacebookAuthenticator("DUMMY_TOKEN");

            Assert.IsNotNull(facebookAuth);
            Assert.IsTrue(facebookAuth is TokenAuthenticator);

            var personalAuth = AuthenticatorFactory.CreatePersonaAuthenticator("DUMMY_ASSERTION", null);

            Assert.IsNotNull(personalAuth);
            Assert.IsTrue(personalAuth is TokenAuthenticator);
        }
Ejemplo n.º 2
0
        public virtual void TestAuthenticatorFactory()
        {
            Authenticator basicAuth = AuthenticatorFactory.CreateBasicAuthenticator("username"
                                                                                    , "password");

            NUnit.Framework.Assert.IsNotNull(basicAuth);
            NUnit.Framework.Assert.IsTrue(basicAuth is BasicAuthenticator);
            Authenticator facebookAuth = AuthenticatorFactory.CreateFacebookAuthenticator("DUMMY_TOKEN"
                                                                                          );

            NUnit.Framework.Assert.IsNotNull(facebookAuth);
            NUnit.Framework.Assert.IsTrue(facebookAuth is TokenAuthenticator);
            Authenticator personalAuth = AuthenticatorFactory.CreatePersonaAuthenticator("DUMMY_ASSERTION"
                                                                                         , null);

            NUnit.Framework.Assert.IsNotNull(personalAuth);
            NUnit.Framework.Assert.IsTrue(personalAuth is TokenAuthenticator);
        }