public void SetUp()
        {
            _stageMock      = MockRepository.GenerateStrictMock <ISqlGenerationStage> ();
            _commandBuilder = new SqlCommandBuilder();
            _visitor        = new TestableSqlGeneratingOuterSelectExpressionVisitor(_commandBuilder, _stageMock);

            _namedIntExpression   = new NamedExpression("test", Expression.Constant(0));
            _nameColumnExpression = new SqlColumnDefinitionExpression(typeof(string), "c", "Name", false);
            _entityExpression     = new SqlEntityDefinitionExpression(
                typeof(Cook),
                "c",
                "test",
                e => e,
                new SqlColumnDefinitionExpression(typeof(int), "c", "ID", true),
                _nameColumnExpression,
                new SqlColumnDefinitionExpression(typeof(string), "c", "FirstName", false)
                );
        }
Example #2
0
        public void SetUp()
        {
            _stageMock             = MockRepository.GenerateStrictMock <ISqlGenerationStage> ();
            _commandBuilder        = new SqlCommandBuilder();
            _someSetOperationsMode = Some.Item(SetOperationsMode.StatementIsSetCombined, SetOperationsMode.StatementIsNotSetCombined);
            _visitor = CreateVisitor(_someSetOperationsMode);

            _namedIntExpression = new NamedExpression("test", Expression.Constant(0));
            var nameColumnExpression = new SqlColumnDefinitionExpression(typeof(string), "c", "Name", false);

            _namedNameColumnExpression = new NamedExpression("SomeName", nameColumnExpression);
            _entityExpression          = new SqlEntityDefinitionExpression(
                typeof(Cook),
                "c",
                "test",
                e => e,
                new SqlColumnDefinitionExpression(typeof(int), "c", "ID", true),
                nameColumnExpression,
                new SqlColumnDefinitionExpression(typeof(string), "c", "FirstName", false)
                );
        }