Esempio n. 1
0
            public void ThrowsInvalidOperationExceptionIfGuestSystemIsDisabled()
            {
                var settings = new CoreSettings
                {
                    EnableGuestSystem = false,
                    LockRemoteControl = true
                };

                var  accessControl = new AccessControl(settings);
                Guid localToken    = accessControl.RegisterLocalAccessToken();

                accessControl.SetRemotePassword(localToken, "Password");

                Guid token = accessControl.RegisterRemoteAccessToken(new Guid());

                Assert.Throws <InvalidOperationException>(() => accessControl.RegisterShadowVote(token, SetupShadowVotedEntry()));
            }
            public void ThrowsInvalidOperationExceptionIfGuestSystemIsDisabled()
            {
                var settings = new CoreSettings
                {
                    EnableGuestSystem = false,
                    LockRemoteControl = true
                };

                var accessControl = new AccessControl(settings);
                Guid localToken = accessControl.RegisterLocalAccessToken();
                accessControl.SetRemotePassword(localToken, "Password");

                Guid token = accessControl.RegisterRemoteAccessToken(new Guid());

                Assert.Throws<InvalidOperationException>(() => accessControl.RegisterShadowVote(token, SetupShadowVotedEntry()));
            }