public void Get_All_Receivers_Should_Throw_An_Exception_If_Status_Is_Not_Existing() { // Arrange var chainblock = new Models.Chainblock(); // Act chainblock.Add(this.firstTransaction); // Assert Assert.Throws <InvalidOperationException>( () => chainblock.GetAllReceiversWithTransactionStatus(TransactionStatus.Aborted), // Act "This status is existing."); }
public void Get_All_Receivers_With_Transaction_Status_Should_Return_Them_Correctly() { // Arrange var chainblock = new Models.Chainblock(); // Act chainblock.Add(this.firstTransaction); this.secondTransaction = new Transaction(100, "Ivancho", "Samuilcho", 501, TransactionStatus.Successfull); chainblock.Add(this.secondTransaction); var receivers = chainblock .GetAllReceiversWithTransactionStatus(TransactionStatus.Successfull) .ToList(); // Assert Assert.That(receivers, Is.Not.Null); Assert.That(receivers[0], Is.EqualTo("Samuilcho")); Assert.That(receivers[1], Is.EqualTo("Samuil")); }