private IEnumerable <tt_dlfx_posting_result> MockMany(int limit = 500) { for (var index = 0; index < limit; index++) { var uniqueId = Guid.NewGuid().ToString("N"); var postingResult = new tt_dlfx_posting_result(); postingResult.UNIQUE_ID = uniqueId; postingResult.DRNUM = $"DR{DateTime.Now.ToString("yyyyMMddHHmmss")}"; postingResult.LOCATION = "ÄþÏÄÖÐÎÀÊÐɳÆÂÍ·Çø"; postingResult.INDICATOR = "Y"; postingResult.TRANSFER_DATE = DateTime.Now; yield return(postingResult); } }
public void Test_Insert() { var uniqueId = Guid.NewGuid().ToString("N"); var postingResult = new tt_dlfx_posting_result(); postingResult.UNIQUE_ID = uniqueId; postingResult.DRNUM = $"DR{DateTime.Now.ToString("yyyyMMddHHmmss")}"; postingResult.LOCATION = "ÄþÏÄÖÐÎÀÊÐɳÆÂÍ·Çø"; postingResult.INDICATOR = "Y"; postingResult.TRANSFER_DATE = DateTime.Now; connection.Insert(postingResult); connection.DeleteAll <tt_dlfx_posting_result>(); var list = connection.Get <tt_dlfx_posting_result>(uniqueId); Assert.IsNotNull(list); }