public async void DeleteFilterAsyncTests() { var jobs = fixture.CreateMany <JobRepositoryModel>(3); _deviceListFilterRepositoryMock.Setup(x => x.DeleteFilterAsync(It.IsAny <string>())).ReturnsAsync(true); var ret = await _filterLogic.DeleteFilterAsync("myFilter", true); Assert.True(ret); _jobRepositoryMock.Setup(x => x.QueryByFilterIdAsync(It.IsAny <string>())).ReturnsAsync(jobs); ret = await _filterLogic.DeleteFilterAsync("myFilter", false); Assert.False(ret); }
public async Task <HttpResponseMessage> DeleteFilter(string filterId, bool force = false) { ValidateArgumentNotNullOrWhitespace("filterId", filterId); return(await GetServiceResponseAsync <bool>(async() => { return await _filterLogic.DeleteFilterAsync(filterId, force); })); }