@@ -23,6 +23,7 @@ public void PublishFromPackage()
23
23
var package = "test-package" ;
24
24
var connectionStrings = new Hashtable ( ) ;
25
25
connectionStrings [ "DefaultConnection" ] = "test-connection-string" ;
26
+ string setParametersFile = "testfile.xml" ;
26
27
27
28
var publishProfile = new WebSiteGetPublishProfileResponse . PublishProfile ( )
28
29
{
@@ -36,12 +37,13 @@ public void PublishFromPackage()
36
37
Mock < IWebsitesClient > clientMock = new Mock < IWebsitesClient > ( ) ;
37
38
38
39
clientMock . Setup ( c => c . GetWebDeployPublishProfile ( websiteName , slot ) ) . Returns ( publishProfile ) ;
39
- clientMock . Setup ( c => c . PublishWebProject ( websiteName , slot , package , string . Empty , connectionStrings , false , false ) )
40
- . Callback ( ( string n , string s , string p , Hashtable cs , bool skipAppData , bool doNotDelete ) =>
40
+ clientMock . Setup ( c => c . PublishWebProject ( websiteName , slot , package , setParametersFile , connectionStrings , false , false ) )
41
+ . Callback ( ( string n , string s , string p , string spf , Hashtable cs , bool skipAppData , bool doNotDelete ) =>
41
42
{
42
43
Assert . Equal ( websiteName , n ) ;
43
44
Assert . Equal ( slot , s ) ;
44
45
Assert . Equal ( package , p ) ;
46
+ Assert . Equal ( setParametersFile , spf ) ;
45
47
Assert . Equal ( connectionStrings , cs ) ;
46
48
Assert . False ( skipAppData ) ;
47
49
Assert . False ( doNotDelete ) ;
@@ -56,7 +58,8 @@ public void PublishFromPackage()
56
58
Name = websiteName ,
57
59
Package = package ,
58
60
ConnectionString = connectionStrings ,
59
- WebsitesClient = clientMock . Object
61
+ WebsitesClient = clientMock . Object ,
62
+ SetParametersFile = setParametersFile
60
63
} ;
61
64
62
65
command . ExecuteCmdlet ( ) ;
@@ -76,6 +79,7 @@ public void PublishFromProjectFile()
76
79
var logFile = string . Format ( @"{0}\build.log" , Directory . GetCurrentDirectory ( ) ) ;
77
80
var connectionStrings = new Hashtable ( ) ;
78
81
connectionStrings [ "DefaultConnection" ] = "test-connection-string" ;
82
+ string setParametersFile = "testfile.xml" ;
79
83
80
84
using ( FileSystemHelper files = new FileSystemHelper ( this ) )
81
85
{
@@ -96,12 +100,13 @@ public void PublishFromProjectFile()
96
100
97
101
clientMock . Setup ( c => c . GetWebDeployPublishProfile ( websiteName , slot ) ) . Returns ( publishProfile ) ;
98
102
clientMock . Setup ( c => c . BuildWebProject ( projectFile , configuration , logFile ) ) . Returns ( package ) ;
99
- clientMock . Setup ( c => c . PublishWebProject ( websiteName , slot , package , string . Empty , connectionStrings , false , false ) )
100
- . Callback ( ( string n , string s , string p , Hashtable cs , bool skipAppData , bool doNotDelete ) =>
103
+ clientMock . Setup ( c => c . PublishWebProject ( websiteName , slot , package , setParametersFile , connectionStrings , false , false ) )
104
+ . Callback ( ( string n , string s , string p , string spf , Hashtable cs , bool skipAppData , bool doNotDelete ) =>
101
105
{
102
106
Assert . Equal ( websiteName , n ) ;
103
107
Assert . Equal ( slot , s ) ;
104
108
Assert . Equal ( package , p ) ;
109
+ Assert . Equal ( setParametersFile , spf ) ;
105
110
Assert . Equal ( connectionStrings , cs ) ;
106
111
Assert . False ( skipAppData ) ;
107
112
Assert . False ( doNotDelete ) ;
@@ -117,7 +122,8 @@ public void PublishFromProjectFile()
117
122
Name = websiteName ,
118
123
ProjectFile = projectFile ,
119
124
Configuration = configuration ,
120
- ConnectionString = connectionStrings
125
+ ConnectionString = connectionStrings ,
126
+ SetParametersFile = setParametersFile
121
127
} ;
122
128
123
129
command . ExecuteCmdlet ( ) ;
0 commit comments