Created
April 11, 2021 20:10
-
-
Save StacyGay/19018f17408761b4cd7768d61c78e605 to your computer and use it in GitHub Desktop.
Trinity of test example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Theory, AutoMoqData] | |
public void Should_Throw_On_Invalid_Email([Frozen] Mock<IProductRepo> productRepo, | |
Product product, Customer customer, TransactionService testTransactionService) | |
{ | |
customer.Email = "Not an email address"; | |
productRepo.setup(repo => repo.GetProduct(It.Is<int>(product.id)).Returns(product); | |
Assert.Throws(() => testTransactionService.Sell(product.Id,customer)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment