示例#1
0
        public void TestCheckCredentials()
        {
            Enzoic enzoic = GetEnzoic();

            bool exposed = enzoic.CheckCredentials("*****@*****.**", "123456");

            Assert.IsTrue(exposed);

            exposed = enzoic.CheckCredentials("*****@*****.**", "notvalid");
            Assert.IsFalse(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "testpwdpng4452");
            Assert.IsTrue(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "notvalid");
            Assert.IsFalse(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "testpwdpng4452", null, new PasswordType[] { PasswordType.vBulletinPost3_8_5 });
            Assert.IsFalse(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "testpwdpng4452", new DateTime(2018, 3, 1), null);
            Assert.IsFalse(exposed);

            // test using Raw Credentials version of the API, if enabled
            if (GetRawCredentialsAPIEnabled())
            {
                exposed = enzoic.CheckCredentials("*****@*****.**", "123456", null, null, true);
                Assert.IsTrue(exposed);

                exposed = enzoic.CheckCredentials("*****@*****.**", "notvalid", null, null, true);
                Assert.IsFalse(exposed);
            }
        }
        public void TestCheckCredentials()
        {
            Enzoic enzoic = GetEnzoic();

            bool exposed = enzoic.CheckCredentials("*****@*****.**", "123456");

            Assert.IsTrue(exposed);

            exposed = enzoic.CheckCredentials("*****@*****.**", "notvalid");
            Assert.IsFalse(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "testpwdpng4452");
            Assert.IsTrue(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "notvalid");
            Assert.IsFalse(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "testpwdpng4452", null, new PasswordType[] { PasswordType.vBulletinPost3_8_5 });
            Assert.IsFalse(exposed);

            exposed = enzoic.CheckCredentials("testpwdpng445", "testpwdpng4452", new DateTime(2018, 3, 1), null);
            Assert.IsFalse(exposed);
        }