Beispiel #1
0
        public bool Should_use_partition_id_when_timestamp_is_0(string partStart, int partitionID)
        {
            var txRec         = CreateTxRec(timestamp: 0, journalMaxRec: 1001);
            var partStartDate = DateTime.ParseExact(partStart, "dd-MM-yyyy", null);

            // ReSharper disable once InvokeAsExtensionMethod
            // Act.
            var isCommited = TxRecExtensions.IsCommited(txRec, partStartDate, partitionID);

            return(isCommited);
        }
Beispiel #2
0
        public bool Should_use_last_partition_timestamp(string partStart, int partitionID)
        {
            long timestamp = DateUtils.DateTimeToUnixTimeStamp(new DateTime(2012, 01, 23));
            var  txRec     = CreateTxRec(timestamp, 0);

            var partStartDate = DateTime.ParseExact(partStart, "dd-MM-yyyy", null);

            // ReSharper disable once InvokeAsExtensionMethod
            // Act.
            var isCommited = TxRecExtensions.IsCommited(txRec, partStartDate, partitionID);

            return(isCommited);
        }