Ejemplo n.º 1
0
        public void ReturnVariableNoSelectTest()
        {
            // Arrange
            var helper    = new ProcedureHelper();
            var procedure = new Procedure("proc", "proc", null, null, null);

            // Act
            var result = helper.GetReturnVariable(procedure);

            // Assert
            Assert.AreEqual("int result;", result);
        }
Ejemplo n.º 2
0
        public void ReturnVariableSingleSelectTest()
        {
            // Arrange
            var helper    = new ProcedureHelper();
            var procedure = new Procedure("proc", "proc", null, null, new List <Select> {
                new Select(new List <SelectColumn> {
                    new SelectColumn("col1", DataTypeHelper.Instance.GetMap(TypeFormat.DotNetFrameworkType, "Int32?"), true),
                    new SelectColumn("col2", DataTypeHelper.Instance.GetMap(TypeFormat.DotNetFrameworkType, "String"), true)
                }, false, null)
            });

            // Act
            var result = helper.GetReturnVariable(procedure);

            // Assert
            Assert.AreEqual("Result<IEnumerable<procOutputDto>> result = new Result<IEnumerable<procOutputDto>>();", result);
        }
Ejemplo n.º 3
0
        public void ReturnVariableSingleSelectTest()
        {
            // Arrange
            var helper = new ProcedureHelper();
            var procedure = new Procedure("proc", "proc", null, null, new List<Select>{
                new Select(new List<SelectColumn>{
                  new SelectColumn("col1", DataTypeHelper.Instance.GetMap(TypeFormat.DotNetFrameworkType, "Int32?"), true),
                  new SelectColumn("col2", DataTypeHelper.Instance.GetMap(TypeFormat.DotNetFrameworkType, "String"), true)
                }, false, null)
            });

            // Act
            var result = helper.GetReturnVariable(procedure);

            // Assert
            Assert.AreEqual("Result<IEnumerable<procOutputDto>> result = new Result<IEnumerable<procOutputDto>>();", result);
        }
Ejemplo n.º 4
0
        public void ReturnVariableNoSelectTest()
        {
            // Arrange
            var helper = new ProcedureHelper();
            var procedure = new Procedure("proc", "proc", null, null, null);

            // Act
            var result = helper.GetReturnVariable(procedure);

            // Assert
            Assert.AreEqual("int result;", result);
        }