1
1
using System ;
2
- using System . Linq ;
3
2
using System . Net ;
4
3
using System . Net . Http ;
5
4
using System . Threading . Tasks ;
6
5
using Abp . AspNetCore . TestBase ;
7
- using Abp . Extensions ;
8
6
using AbpCompanyName . AbpProjectName . EntityFrameworkCore ;
9
7
using AbpCompanyName . AbpProjectName . Tests . TestDatas ;
10
8
using Microsoft . AspNetCore . Hosting ;
11
- using Microsoft . AspNetCore . Routing ;
12
9
using Newtonsoft . Json ;
13
10
using Newtonsoft . Json . Serialization ;
14
11
using Shouldly ;
15
- using Abp . Collections . Extensions ;
16
12
17
13
namespace AbpCompanyName . AbpProjectName . Web . Tests
18
14
{
19
- public abstract class AbpProjectNameWebTestBase : AbpAspNetCoreIntegratedTestBase < Startup >
15
+ public abstract class AbpProjectNameWebTestBase : AbpAspNetCoreIntegratedTestBase < Startup >
20
16
{
21
17
protected static readonly Lazy < string > ContentRootFolder ;
22
18
@@ -37,39 +33,6 @@ protected override IWebHostBuilder CreateWebHostBuilder()
37
33
. UseContentRoot ( ContentRootFolder . Value ) ;
38
34
}
39
35
40
- #region GetUrl
41
-
42
- protected virtual string GetUrl < TController > ( )
43
- {
44
- var controllerName = typeof ( TController ) . Name ;
45
- if ( controllerName . EndsWith ( "Controller" ) )
46
- {
47
- controllerName = controllerName . Left ( controllerName . Length - "Controller" . Length ) ;
48
- }
49
-
50
- return "/" + controllerName ;
51
- }
52
-
53
- protected virtual string GetUrl < TController > ( string actionName )
54
- {
55
- return GetUrl < TController > ( ) + "/" + actionName ;
56
- }
57
-
58
- protected virtual string GetUrl < TController > ( string actionName , object queryStringParamsAsAnonymousObject )
59
- {
60
- var url = GetUrl < TController > ( actionName ) ;
61
-
62
- var dictionary = new RouteValueDictionary ( queryStringParamsAsAnonymousObject ) ;
63
- if ( dictionary . Any ( ) )
64
- {
65
- url += "?" + dictionary . Select ( d => $ "{ d . Key } ={ d . Value } ") . JoinAsString ( "&" ) ;
66
- }
67
-
68
- return url ;
69
- }
70
-
71
- #endregion
72
-
73
36
#region Get response
74
37
75
38
protected async Task < T > GetResponseAsObjectAsync < T > ( string url ,
0 commit comments