Selaa lähdekoodia

[WebApiUtils] tests

feature/authentication-tests
Robin Thoni 9 vuotta sitten
vanhempi
commit
a06777db8a

+ 3
- 3
WebAPiUtils-test/BusinessManager/ValuesBusiness.cs Näytä tiedosto

@@ -1,5 +1,5 @@
1
-using System.Collections.Generic;
2
-using iiie.Logs.DBO;
1
+using iiie.Logs.DBO;
2
+using iiie.WebApiUtils.DBO;
3 3
 using WebAPiUtils_test.DataAccess;
4 4
 using WebAPiUtils_test.DBO;
5 5
 
@@ -12,7 +12,7 @@ namespace WebAPiUtils_test.BusinessManager
12 12
             return ValuesManager.GetSingleById(id);
13 13
         }
14 14
 
15
-        public static OpResult<IEnumerable<ValuesDboGet>> Contains(string text, int page, int perPage)
15
+        public static OpResult<DboGetMultiple<ValuesDboGet>> Contains(string text, int page, int perPage)
16 16
         {
17 17
             return ValuesManager.Contains(text, page, perPage);
18 18
         }

+ 3
- 3
WebAPiUtils-test/Controllers/ValuesController.cs Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 using System;
2
-using System.Collections.Generic;
3 2
 using System.Web.Http;
4 3
 using iiie.WebApiUtils.BusinessManager;
4
+using iiie.WebApiUtils.DBO;
5 5
 using WebAPiUtils_test.BusinessManager;
6 6
 using WebAPiUtils_test.DBO;
7 7
 
@@ -18,9 +18,9 @@ namespace WebAPiUtils_test.Controllers
18 18
 
19 19
         [HttpGet]
20 20
         [Route("api/values/contains")]
21
-        public IEnumerable<ValuesDboGet> Contains(string text, int page = 0, int perPage = Int32.MaxValue)
21
+        public DboGetMultiple<ValuesDboGet> Contains(string text, int page = 0, int perPage = Int32.MaxValue)
22 22
         {
23
-            return BMRHandler<IEnumerable<ValuesDboGet>>.Handle(ValuesBusiness.Contains(text, page, perPage), Request);
23
+            return BMRHandler<DboGetMultiple<ValuesDboGet>>.Handle(ValuesBusiness.Contains(text, page, perPage), Request);
24 24
         }
25 25
 
26 26
         [HttpPost]

+ 3
- 3
WebAPiUtils-test/DataAccess/ValuesManager.cs Näytä tiedosto

@@ -1,7 +1,7 @@
1
-using System.Collections.Generic;
2
-using System.Data.Entity;
1
+using System.Data.Entity;
3 2
 using iiie.Logs.DBO;
4 3
 using iiie.WebApiUtils.BusinessManager;
4
+using iiie.WebApiUtils.DBO;
5 5
 using WebAPiUtils_test.DBO;
6 6
 
7 7
 namespace WebAPiUtils_test.DataAccess
@@ -46,7 +46,7 @@ namespace WebAPiUtils_test.DataAccess
46 46
             };
47 47
         }
48 48
 
49
-        public static OpResult<IEnumerable<ValuesDboGet>> Contains(string text, int page, int perPage)
49
+        public static OpResult<DboGetMultiple<ValuesDboGet>> Contains(string text, int page, int perPage)
50 50
         {
51 51
             return GetMultiple(x => x.my_string.Contains(text), x => x.id, page, perPage);
52 52
         }

Loading…
Peruuta
Tallenna