public void MortgageTypeShouldBeFixed() { var mortgages = mortgageService.GetByType((int)Contracts.Dto.MortgageType.Fixed); Assert.IsNotNull(mortgages, "Mortgage Data should not be null."); Assert.IsTrue(mortgages.Count == 4, "Mortgage Data count should be four."); Assert.IsFalse(mortgages.Any(m => m.MortgageType == Contracts.Dto.MortgageType.Variable), "Mortgage Data should not contain variable mortgage type."); }
public IEnumerable <Mortgage> GetByType(int?id = null) { return(_mortgageService.GetByType(id)); }