AccessLogTests.Repository.TransactionRepositoryTests.ShouldBeAbleToGetLastTransactionForAGivenGate C# (CSharp) Method

ShouldBeAbleToGetLastTransactionForAGivenGate() private method

private ShouldBeAbleToGetLastTransactionForAGivenGate ( ) : void
return void
        public void ShouldBeAbleToGetLastTransactionForAGivenGate()
        {
            var when = new DateTime(2013, 11, 29, 10, 00, 00);
            var whenStart = new DateTime(2013, 11, 29, 9, 58, 00);
            var transactions = this.transactionRepository.GetLastTransactions(when).ToList();

            Assert.IsNotEmpty(transactions);
            Assert.That(transactions, Has.Count.EqualTo(2));
            Assert.That(transactions.All(transaction => transaction.CreatedAt <= when), Is.True);
            Assert.That(transactions.All(transaction => transaction.CreatedAt >= whenStart), Is.True);
        }