Guest User

Untitled

a guest
Apr 25th, 2019
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class BankServiceTest{
  2. [Fact]
  3. public void GetBanks_Should_ReturnBankList()
  4. {
  5. //Arrange
  6. var bank = new Bank();
  7. bankId = 1;
  8. var service = new BankServices();
  9.  
  10. //Act
  11. var sut = service.GetBank(bank);
  12.  
  13. //Assert
  14. Assert.True(sut.Id = bank.Id);
  15. }
  16. }
  17.  
  18. public class BankServices{
  19. public Bank GetBank(Bank bank)
  20. {
  21. return _context.Banks.FirstOrDefault(x => x.Id = bank.Id);
  22. }
  23. }
RAW Paste Data