public void AddSharedWebCredentialNullAccount()
        {
            account = null;
            Action <NSError> handler = (NSError e) => {
            };

            Assert.Throws <ArgumentNullException> (() => SecSharedCredential.AddSharedWebCredential(domainName, account, password, handler));
        }
        public void CreateSharedWebCredentialPassword()
        {
            TestRuntime.AssertSystemVersion(ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false);

            var pwd = SecSharedCredential.CreateSharedWebCredentialPassword();

            Assert.IsNotNull(pwd);
        }
        public void AddSharedWebCredentialNotNullPassword()
        {
            TestRuntime.AssertSystemVersion(ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false);

            Action <NSError> handler = (NSError e) => {
                // we do nothing, if we did block the test should be interactive because a dialog is shown.
            };

            SecSharedCredential.AddSharedWebCredential(domainName, account, password, handler);
        }
Ejemplo n.º 4
0
        public void CreateSharedWebCredentialPassword()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Ignore("Ignoring CreateSharedWebCredentialPassword test: Requires iOS8+");
            }

            var pwd = SecSharedCredential.CreateSharedWebCredentialPassword();

            Assert.IsNotNull(pwd);
        }
        public void AddSharedWebCredentialNullAccount()
        {
            account = null;
            Action <NSError> handler = (NSError e) => {
                Assert.IsNull(e);
                waitEvent.Set();
            };

            SecSharedCredential.AddSharedWebCredential(domainName, account, password, handler);
            waitEvent.WaitOne();
            Assert.Pass("Block was correctly executed.");
        }
Ejemplo n.º 6
0
        public void AddSharedWebCredentialNotNullPassword()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Ignore("Ignoring AddSharedWebCredentialNotNullPassword test: Requires iOS8+");
            }

            Action <NSError> handler = (NSError e) => {
                // we do nothing, if we did block the test should be interactive because a dialog is shown.
            };

            SecSharedCredential.AddSharedWebCredential(domainName, account, password, handler);
        }
Ejemplo n.º 7
0
        public void RequestSharedWebCredentialNullAccount()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Ignore("Ignoring RequestSharedWebCredentialNullAccount test: Requires iOS8+");
            }

            Action <string[], NSError> getHandler = (string [] pwds, NSError e) => {
                waitEvent.Set();
            };

            SecSharedCredential.RequestSharedWebCredential(null, null, getHandler);
            waitEvent.WaitOne();
            Assert.Pass("Block was correctly executed.");
        }