public void When_Non_Sasl_Bucket_And_Empty_Password_Authenticate_Returns_true()
        {
            var authenticator = new PlainTextMechanism(_ioService, new DefaultTranscoder());
            _ioService.ConnectionPool.Initialize();

            foreach (var connection in _ioService.ConnectionPool.Connections)
            {
                var isAuthenticated = authenticator.Authenticate(connection, "default", "");
                Assert.IsTrue(isAuthenticated);
            }
        }
        public void When_Valid_Invalid_Credentials_Provided_Authenticate_Returns_False()
        {
            var authenticator = new PlainTextMechanism(_ioStrategy, new ManualByteConverter());
            _ioStrategy.ConnectionPool.Initialize();

            foreach (var connection in _ioStrategy.ConnectionPool.Connections)
            {
                var isAuthenticated = authenticator.Authenticate(connection, "authenticated", "badpass");
                Assert.IsFalse(isAuthenticated);
            }
        }
        public void When_Valid_Invalid_Credentials_Provided_Authenticate_Returns_False()
        {
            var authenticator = new PlainTextMechanism(_ioService, new DefaultTranscoder());
            _ioService.ConnectionPool.Initialize();

            foreach (var connection in _ioService.ConnectionPool.Connections)
            {
                var isAuthenticated = authenticator.Authenticate(connection, "authenticated", "badpass");
                Assert.IsFalse(isAuthenticated);
            }
        }
        public void When_Valid_Credentials_Provided_Authenticate_Returns_True()
        {
            var authenticator = new PlainTextMechanism(_ioStrategy, new DefaultTranscoder());
            _ioStrategy.ConnectionPool.Initialize();

            foreach (var connection in _ioStrategy.ConnectionPool.Connections)
            {
                var isAuthenticated = authenticator.Authenticate(connection, "authenticated", "secret");
                Assert.IsTrue(isAuthenticated);
            }
        }