public void Get_By_Transaction_Status_And_Maximum_Amount_Should_Work_Correctly_With_Empty_Collection() { // Arrange var chainblock = new Models.Chainblock(); // Act var transaction1 = new Transaction(100, "Peshko", "Samuilcho", 100, TransactionStatus.Successfull); var transaction2 = new Transaction(101, "Peshko", "Samuilcho", 200, TransactionStatus.Successfull); var transaction3 = new Transaction(102, "Peshko", "Samuilcho", 300, TransactionStatus.Successfull); var transaction4 = new Transaction(103, "Peshko", "Samuilcho", 400, TransactionStatus.Successfull); var transaction5 = new Transaction(104, "Peshko", "Samuilcho", 400, TransactionStatus.Successfull); chainblock.Add(transaction1); chainblock.Add(transaction2); chainblock.Add(transaction3); chainblock.Add(transaction4); chainblock.Add(transaction5); var status = TransactionStatus.Successfull; var amount = 50; var transactions = chainblock .GetByTransactionStatusAndMaximumAmount(status, amount) .ToList(); // Assert Assert.That(transactions.Count == 0); }
public void Get_By_Transaction_Status_And_Maximum_Amount_Should_Throw_An_Exception_If_Amount_Is_Zero() { // Arrange var chainblock = new Models.Chainblock(); // Assert Assert.Throws <InvalidOperationException>( () => chainblock.GetByTransactionStatusAndMaximumAmount(TransactionStatus.Successfull, -1000), // Act "Amount is not under zero"); }