public void DTOObjectSingleSelectMultipleRowMultipleColumnTest() { // 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.GetDtoObject(procedure); // Assert Assert.AreEqual(@"/// <summary> /// DTO for the output of the ""proc"" stored procedure. /// </summary> public partial class procOutputDto { public Int32? col1 { get; set; } public String col2 { get; set; } } ", result); }
public void DTOObjectSingleSelectMultipleRowMultipleColumnTest() { // 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.GetDtoObject(procedure); // Assert Assert.AreEqual(@"/// <summary> /// DTO for the output of the ""proc"" stored procedure. /// </summary> public partial class procOutputDto { public Int32? col1 { get; set; } public String col2 { get; set; } } ", result); }
public void DTOObjectNoSelectTest() { // Arrange var helper = new ProcedureHelper(); var procedure = new Procedure("proc", "proc", null, null, null); // Act var result = helper.GetDtoObject(procedure); // Assert Assert.AreEqual("", result); }
public void DTOObjectSingleSelectMultipleRowSingleColumnTest() { // 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) }, false, null) }); // Act var result = helper.GetDtoObject(procedure); // Assert Assert.AreEqual("", result); }
public void DTOObjectSingleSelectMultipleRowSingleColumnTest() { // 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) }, false, null) }); // Act var result = helper.GetDtoObject(procedure); // Assert Assert.AreEqual("", result); }