SHARE
TWEET

Untitled

a guest Apr 25th, 2019 53 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top