Exemplo n.º 1
0
 public async Task <HttpResponseMessage> GetSuggestClauses([FromUri] int skip = 0, [FromUri] int take = 15)
 {
     return(await GetServiceResponseAsync <IEnumerable <Clause> >(async() =>
     {
         return await _filterLogic.GetSuggestClauses(skip, take);
     }));
 }
Exemplo n.º 2
0
        public async void GetSuggestClausesTest()
        {
            var clauses = fixture.CreateMany <Clause>(5);

            _deviceListFilterRepositoryMock.Setup(x => x.GetSuggestClausesAsync(It.IsNotNull <int>(), It.IsNotNull <int>())).ReturnsAsync(clauses);
            var ret = await _filterLogic.GetSuggestClauses(0, 10);

            Assert.Equal(5, ret.Count());
        }