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); }
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); }
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); }
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); }