public void NewLineFact() { var connection = default(DbConnection); try { connection = KandaProviderFactory.Instance.CreateConnection(); connection.Open(); var nl = default(string); nl = KandaTableDataGateway.NewLine(connection); Assert.Equal(2, nl.Length); nl = KandaTableDataGateway.NewLine(-1, connection); Assert.Equal(0, nl.Length); nl = KandaTableDataGateway.NewLine(0, connection); Assert.Equal(0, nl.Length); nl = KandaTableDataGateway.NewLine(1, connection); Assert.Equal(2, nl.Length); nl = KandaTableDataGateway.NewLine(2, connection); Assert.Equal(4, nl.Length); nl = KandaTableDataGateway.NewLine(3, connection); Assert.Equal(6, nl.Length); } finally { if (connection != null) { connection.Close(); } } }
/// <summary> /// システムの現在時刻を取得します。 /// </summary> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public static DateTime GetUtcDateTime(DbConnection connection, DbTransaction transaction = null) { var utc = KandaTableDataGateway.GetUtcDateTime(connection, transaction); return(utc); }