public void FieldListParameter003()
        {
            // Arrange
            bool   actual;
            string dummy;
            var    expressionCache   = new ExpressionCache <TestDocumentWithAttribute>();
            var    expressionBuilder = (IExpressionBuilder <TestDocumentWithAttribute>) new ExpressionBuilder <TestDocumentWithAttribute>(expressionCache);
            var    parameter         = new FieldListParameter <TestDocumentWithAttribute>(expressionBuilder);

            parameter.Configure(q => q.Stored);

            // Act
            parameter.Validate(out actual, out dummy);

            // Assert
            Assert.True(actual);
        }
        public void FieldListParameter008()
        {
            // Arrange
            bool   isValid;
            string errorMessage;
            var    container         = new List <string>();
            var    expressionCache   = new ExpressionCache <TestDocumentWithAttribute>();
            var    expressionBuilder = (IExpressionBuilder <TestDocumentWithAttribute>) new ExpressionBuilder <TestDocumentWithAttribute>(expressionCache);
            var    parameter         = new FieldListParameter <TestDocumentWithAttribute>(expressionBuilder);

            parameter.Configure(q => q.Stored);

            // Act
            parameter.Validate(out isValid, out errorMessage);

            // Assert
            Assert.True(isValid);
        }
        public void FieldListParameter009()
        {
            // Arrange
            bool   isValid;
            string errorMessage;
            var    container         = new List <string>();
            var    expressionCache   = new ExpressionCache <TestDocumentWithAttribute>();
            var    expressionBuilder = (IExpressionBuilder <TestDocumentWithAttribute>) new ExpressionBuilder <TestDocumentWithAttribute>(expressionCache);
            var    parameter         = new FieldListParameter <TestDocumentWithAttribute>(expressionBuilder);

            parameter.Configure(q => q.NotStored);

            // Act
            parameter.Validate(out isValid, out errorMessage);

            // Assert
            Assert.False(isValid);
            Assert.Equal(Resource.FieldMustBeStoredTrueToBeUsedInFieldsException, errorMessage);
        }