public void Filter_Fetch() { var filter = FilterTestHelper.FilterNew(); filter = FilterRepository.FilterSave(filter); filter = FilterRepository.FilterFetch(filter.FilterId); Assert.IsTrue(filter != null, "Row returned should not equal null"); }
public void Filter_Add() { var filter = FilterTestHelper.FilterNew(); Assert.IsTrue(filter.IsValid, "IsValid should be true"); filter = FilterRepository.FilterSave(filter); Assert.IsTrue(filter.FilterId != 0, "FilterId should be a non-zero value"); FilterRepository.FilterFetch(filter.FilterId); }
public void Filter_Edit() { var filter = FilterTestHelper.FilterNew(); var name = filter.Name; Assert.IsTrue(filter.IsValid, "IsValid should be true"); filter = FilterRepository.FilterSave(filter); filter = FilterRepository.FilterFetch(filter.FilterId); filter.Name = DataHelper.RandomString(20); filter = FilterRepository.FilterSave(filter); filter = FilterRepository.FilterFetch(filter.FilterId); Assert.IsTrue(filter.Name != name, "Name should have different value"); }
public void Filter_Delete() { var filter = FilterTestHelper.FilterNew(); Assert.IsTrue(filter.IsValid, "IsValid should be true"); filter = FilterRepository.FilterSave(filter); filter = FilterRepository.FilterFetch(filter.FilterId); FilterRepository.FilterDelete(filter.FilterId); try { FilterRepository.FilterFetch(filter.FilterId); } catch (Exception ex) { Assert.IsTrue(ex.GetBaseException() is InvalidOperationException); } }