Example #1
0
        public void CheckServiceActive()
        {
            var pm  = new DefaultPasswordManager(NOPApplication.Instance);
            var buf = IDPasswordCredentials.PlainPasswordToSecureBuffer("@8luE+5ky=");

            try
            {
                var hash = pm.ComputeHash(PasswordFamily.Text, buf);
                Aver.Fail("no exception");
            }
            catch (AzosException e)
            {
                Aver.AreEqual(e.Message, StringConsts.DAEMON_INVALID_STATE +
                              typeof(DefaultPasswordManager).Name);
            }
        }
Example #2
0
        public void CheckServiceActive()
        {
            var pm  = new DefaultPasswordManager();
            var buf = IDPasswordCredentials.PlainPasswordToSecureBuffer("@8luE+5ky=");

            try
            {
                var hash = pm.ComputeHash(PasswordFamily.Text, buf);
                Assert.Fail("no exception");
            }
            catch (NFXException e)
            {
                Assert.AreEqual(e.Message, StringConsts.SERVICE_INVALID_STATE +
                                typeof(DefaultPasswordManager).Name);
            }
        }