Esempio n. 1
0
        public void RegularAuthenticationTest()
        {
            var authResult = RabbitAuth.GetAuthType("*****@*****.**", "testpassword");

            Assert.AreEqual(AuthenticationType.Regular, authResult);

            var authResultLongEmail = RabbitAuth.GetAuthType("*****@*****.**", "testpass");

            Assert.AreEqual(AuthenticationType.Regular, authResultLongEmail);
        }
Esempio n. 2
0
        public void MousebreakerAuthenticationTest()
        {
            var authResult = RabbitAuth.GetAuthType("*****@*****.**", "cHJvY2Vzc29yX3dpbGxfbmV2ZXJfZmluZF90aGlzX211YWhhaGFfd2VsbF9tYXliZV9oZV93aWxsX2J1dF9pXw==");

            Assert.AreEqual(AuthenticationType.Mousebreaker, authResult);

            var invalidEmail = RabbitAuth.GetAuthType("testinvalidemailexample.com", "cHJvY2Vzc29yX3dpbGxfbmV2ZXJfZmluZF90aGlzX211YWhhaGFfd2VsbF9tYXliZV9oZV93aWxsX2J1dF9pXw==");

            Assert.AreNotEqual(AuthenticationType.Mousebreaker, invalidEmail);
        }
Esempio n. 3
0
        public void NullAuthenticationTest()
        {
            AuthenticationException expectedException = null;

            try
            {
                RabbitAuth.GetAuthType(null, null);
            }
            catch (AuthenticationException ex)
            {
                expectedException = ex;
            }

            Assert.IsNotNull(expectedException);
        }
Esempio n. 4
0
        public void InvalidAuthenticationTest()
        {
            InvalidOperationException expectedException = null;

            try
            {
                RabbitAuth.GetAuthType("47823", "notahexadecimalstringohno");
            }
            catch (InvalidOperationException ex)
            {
                expectedException = ex;
            }

            Assert.IsNull(expectedException);
        }
Esempio n. 5
0
        public void FacebookAuthenticationTest()
        {
            var authResult = RabbitAuth.GetAuthType(null, "TcsL8qdSwvzDqudWGfYEGF5RrBLBSanHW78t5Z87ngKzUDdhCE4Jbtq6Vrwk2vuVS8WW2RYT54hwFxchWywLLvQaUyA2k2fanfAs");

            Assert.AreEqual(AuthenticationType.Facebook, authResult);
        }
Esempio n. 6
0
        public void ArmorGamesAuthenticationTest()
        {
            var authResult = RabbitAuth.GetAuthType("ee6ab941d09050400c4f916dbb47aad8", "23b9a5088c3c940f82945b6f3df80abc");

            Assert.AreEqual(AuthenticationType.ArmorGames, authResult);
        }
Esempio n. 7
0
        public void KongregateAuthenticationTest()
        {
            var authResult = RabbitAuth.GetAuthType("123456", "969ad76abf19b5c3e5917321e659abe6d8d6f3aba73e5158863c3b4159c00366");

            Assert.AreEqual(AuthenticationType.Kongregate, authResult);
        }