public void GetFxPairById_returnNull_forNonExistingItem() { //Arrange EFCurrencyRepository repository = new EFCurrencyRepository(); FxPairDto baseDto = getDefaultFxPairDto(); insertFxPairToTestDb(baseDto); //Act FxPairDto dto = repository.GetFxPairById(baseDto.Id + 1); //Assert Assert.IsNull(dto); }
public void GetFxPairById_returnProperDto_forExistingItem() { //Arrange EFCurrencyRepository repository = new EFCurrencyRepository(); FxPairDto baseDto = getDefaultFxPairDto(); insertFxPairToTestDb(baseDto); //Act FxPairDto dto = repository.GetFxPairById(baseDto.Id); //Assert var areEqual = baseDto.Equals(dto); Assert.IsTrue(areEqual); }