Esempio n. 1
0
        private void CreateExecForProcUnderTest(ObjectIdentifier procUnderTest)
        {
            var calleeProcedure = new ProcedureReference();

            calleeProcedure.Name = new SchemaObjectName();

            _execProc.ExecuteSpecification = new ExecuteSpecification();
            var entity = new ExecutableProcedureReference();

            entity.ProcedureReference = new ProcedureReferenceName();
            entity.ProcedureReference.ProcedureReference      = calleeProcedure;
            entity.ProcedureReference.ProcedureReference.Name = procUnderTest.ToSchemaObjectName();
            _execProc.ExecuteSpecification.ExecutableEntity   = entity;
        }
Esempio n. 2
0
        private void CreateSelectForFunctionUnderTest(ObjectIdentifier name)
        {
            var select = new QuerySpecification();

            select.SelectElements.Add(new SelectStarExpression());

            var from      = new FromClause();
            var reference = new SchemaObjectFunctionTableReference();

            foreach (var p in _parameters)
            {
                reference.Parameters.Add(new VariableReference()
                {
                    Name = p.Name
                });
            }

            reference.SchemaObject = name.ToSchemaObjectName();
            from.TableReferences.Add(reference);

            select.FromClause = from;
            _functionSelect.QueryExpression = select;
        }
Esempio n. 3
0
        private void CreateExecForProcUnderTest(ObjectIdentifier procUnderTest)
        {
            var calleeProcedure = new ProcedureReference();
            calleeProcedure.Name = new SchemaObjectName();

            _execProc.ExecuteSpecification = new ExecuteSpecification();
            var entity = new ExecutableProcedureReference();
            entity.ProcedureReference = new ProcedureReferenceName();
            entity.ProcedureReference.ProcedureReference = calleeProcedure;
            entity.ProcedureReference.ProcedureReference.Name = procUnderTest.ToSchemaObjectName();
            _execProc.ExecuteSpecification.ExecutableEntity = entity;
        }
Esempio n. 4
0
        private void CreateSelectForFunctionUnderTest(ObjectIdentifier name)
        {
            var select = new QuerySpecification();
            select.SelectElements.Add(new SelectStarExpression());

            var from = new FromClause();
            var reference = new SchemaObjectFunctionTableReference();
            foreach (var p in _parameters)
            {
                reference.Parameters.Add(new VariableReference(){Name = p.Name});
            }
            
            reference.SchemaObject = name.ToSchemaObjectName();
            from.TableReferences.Add(reference);

            select.FromClause = from;
            _functionSelect.QueryExpression = select;
        }