Browse Source

[WebApiUtils] tests

feature/authentication-tests
Robin Thoni 9 years ago
parent
commit
a06777db8a

+ 3
- 3
WebAPiUtils-test/BusinessManager/ValuesBusiness.cs View File

1
-using System.Collections.Generic;
2
-using iiie.Logs.DBO;
1
+using iiie.Logs.DBO;
2
+using iiie.WebApiUtils.DBO;
3
 using WebAPiUtils_test.DataAccess;
3
 using WebAPiUtils_test.DataAccess;
4
 using WebAPiUtils_test.DBO;
4
 using WebAPiUtils_test.DBO;
5
 
5
 
12
             return ValuesManager.GetSingleById(id);
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
             return ValuesManager.Contains(text, page, perPage);
17
             return ValuesManager.Contains(text, page, perPage);
18
         }
18
         }

+ 3
- 3
WebAPiUtils-test/Controllers/ValuesController.cs View File

1
 using System;
1
 using System;
2
-using System.Collections.Generic;
3
 using System.Web.Http;
2
 using System.Web.Http;
4
 using iiie.WebApiUtils.BusinessManager;
3
 using iiie.WebApiUtils.BusinessManager;
4
+using iiie.WebApiUtils.DBO;
5
 using WebAPiUtils_test.BusinessManager;
5
 using WebAPiUtils_test.BusinessManager;
6
 using WebAPiUtils_test.DBO;
6
 using WebAPiUtils_test.DBO;
7
 
7
 
18
 
18
 
19
         [HttpGet]
19
         [HttpGet]
20
         [Route("api/values/contains")]
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
         [HttpPost]
26
         [HttpPost]

+ 3
- 3
WebAPiUtils-test/DataAccess/ValuesManager.cs View File

1
-using System.Collections.Generic;
2
-using System.Data.Entity;
1
+using System.Data.Entity;
3
 using iiie.Logs.DBO;
2
 using iiie.Logs.DBO;
4
 using iiie.WebApiUtils.BusinessManager;
3
 using iiie.WebApiUtils.BusinessManager;
4
+using iiie.WebApiUtils.DBO;
5
 using WebAPiUtils_test.DBO;
5
 using WebAPiUtils_test.DBO;
6
 
6
 
7
 namespace WebAPiUtils_test.DataAccess
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
             return GetMultiple(x => x.my_string.Contains(text), x => x.id, page, perPage);
51
             return GetMultiple(x => x.my_string.Contains(text), x => x.id, page, perPage);
52
         }
52
         }

Loading…
Cancel
Save