15
15
namespace Microsoft . WindowsAzure . Commands . RemoteApp . Test
16
16
{
17
17
using Common ;
18
- using Microsoft . VisualStudio . TestTools . UnitTesting ;
19
18
using Microsoft . WindowsAzure . Management . RemoteApp . Cmdlets ;
20
19
using Microsoft . WindowsAzure . Management . RemoteApp . Models ;
21
20
using Microsoft . WindowsAzure . Commands . ScenarioTest ;
22
21
using System ;
23
22
using System . Collections . Generic ;
24
23
using System . Management . Automation ;
24
+ using Xunit ;
25
25
26
26
// Publish-AzureRemoteAppProgram, Unpublish-AzureRemoteAppProgram
27
- [ TestClass ]
27
+
28
28
public class RemoteAppProgramTest : RemoteAppClientTest
29
29
{
30
30
31
- [ TestCategory ( "CheckIn" ) ]
31
+ [ Fact ]
32
+ [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
32
33
public void GetAllRemoteApps ( )
33
34
{
34
35
List < PublishedApplicationDetails > remoteApps = null ;
@@ -49,32 +50,32 @@ public void GetAllRemoteApps()
49
50
mockCmdlet . ExecuteCmdlet ( ) ;
50
51
if ( mockCmdlet . runTime ( ) . ErrorStream . Count != 0 )
51
52
{
52
- Assert . IsTrue ( false ,
53
+ Assert . True ( false ,
53
54
String . Format ( "Get-AzureRemoteAppCollection returned the following error {0}." ,
54
55
mockCmdlet . runTime ( ) . ErrorStream [ 0 ] . Exception . Message
55
56
)
56
57
) ;
57
58
}
58
59
59
60
remoteApps = MockObject . ConvertList < PublishedApplicationDetails > ( mockCmdlet . runTime ( ) . OutputPipeline ) ;
60
- Assert . IsNotNull ( remoteApps ) ;
61
+ Assert . NotNull ( remoteApps ) ;
61
62
62
- Assert . IsTrue ( remoteApps . Count == countOfExpectedApps ,
63
+ Assert . True ( remoteApps . Count == countOfExpectedApps ,
63
64
String . Format ( "The expected number of collections returned {0} does not match the actual {1}." ,
64
65
countOfExpectedApps ,
65
66
remoteApps . Count
66
67
)
67
68
) ;
68
69
69
- Assert . IsTrue ( MockObject . HasExpectedResults < PublishedApplicationDetails > ( remoteApps , MockObject . ContainsExpectedApplication ) ,
70
+ Assert . True ( MockObject . HasExpectedResults < PublishedApplicationDetails > ( remoteApps , MockObject . ContainsExpectedApplication ) ,
70
71
"The actual result does not match the expected."
71
72
) ;
72
73
73
74
Log ( "The test for Get-AzureRemoteAppCollection with {0} collections completed successfully" , countOfExpectedApps ) ;
74
75
}
75
76
76
- [ TestMethod ]
77
- [ TestCategory ( " CheckIn" ) ]
77
+ [ Fact ]
78
+ [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
78
79
public void GetRemoteAppByName ( )
79
80
{
80
81
List < PublishedApplicationDetails > remoteApps = null ;
@@ -96,32 +97,32 @@ public void GetRemoteAppByName()
96
97
mockCmdlet . ExecuteCmdlet ( ) ;
97
98
if ( mockCmdlet . runTime ( ) . ErrorStream . Count != 0 )
98
99
{
99
- Assert . IsTrue ( false ,
100
+ Assert . True ( false ,
100
101
String . Format ( "Get-AzureRemoteAppCollection returned the following error {0}." ,
101
102
mockCmdlet . runTime ( ) . ErrorStream [ 0 ] . Exception . Message
102
103
)
103
104
) ;
104
105
}
105
106
106
107
remoteApps = MockObject . ConvertList < PublishedApplicationDetails > ( mockCmdlet . runTime ( ) . OutputPipeline ) ;
107
- Assert . IsNotNull ( remoteApps ) ;
108
+ Assert . NotNull ( remoteApps ) ;
108
109
109
- Assert . IsTrue ( remoteApps . Count == countOfExpectedApps ,
110
+ Assert . True ( remoteApps . Count == countOfExpectedApps ,
110
111
String . Format ( "The expected number of collections returned {0} does not match the actual {1}." ,
111
112
countOfExpectedApps ,
112
113
remoteApps . Count
113
114
)
114
115
) ;
115
116
116
- Assert . IsTrue ( MockObject . HasExpectedResults < PublishedApplicationDetails > ( remoteApps , MockObject . ContainsExpectedApplication ) ,
117
+ Assert . True ( MockObject . HasExpectedResults < PublishedApplicationDetails > ( remoteApps , MockObject . ContainsExpectedApplication ) ,
117
118
"The actual result does not match the expected."
118
119
) ;
119
120
120
121
Log ( "The test for Get-AzureRemoteAppCollection with {0} collections completed successfully" , countOfExpectedApps ) ;
121
122
}
122
123
123
- [ TestMethod ]
124
- [ TestCategory ( " CheckIn" ) ]
124
+ [ Fact ]
125
+ [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
125
126
public void GetAllStartMenuApplication ( )
126
127
{
127
128
List < StartMenuApplication > remoteApps = null ;
@@ -142,24 +143,24 @@ public void GetAllStartMenuApplication()
142
143
mockCmdlet . ExecuteCmdlet ( ) ;
143
144
if ( mockCmdlet . runTime ( ) . ErrorStream . Count != 0 )
144
145
{
145
- Assert . IsTrue ( false ,
146
+ Assert . True ( false ,
146
147
String . Format ( "Get-AzureRemoteAppCollection returned the following error {0}." ,
147
148
mockCmdlet . runTime ( ) . ErrorStream [ 0 ] . Exception . Message
148
149
)
149
150
) ;
150
151
}
151
152
152
153
remoteApps = MockObject . ConvertList < StartMenuApplication > ( mockCmdlet . runTime ( ) . OutputPipeline ) ;
153
- Assert . IsNotNull ( remoteApps ) ;
154
+ Assert . NotNull ( remoteApps ) ;
154
155
155
- Assert . IsTrue ( remoteApps . Count == countOfExpectedApps ,
156
+ Assert . True ( remoteApps . Count == countOfExpectedApps ,
156
157
String . Format ( "The expected number of collections returned {0} does not match the actual {1}." ,
157
158
countOfExpectedApps ,
158
159
remoteApps . Count
159
160
)
160
161
) ;
161
162
162
- Assert . IsTrue ( MockObject . HasExpectedResults < StartMenuApplication > ( remoteApps , MockObject . ContainsExpectedStartMenu ) ,
163
+ Assert . True ( MockObject . HasExpectedResults < StartMenuApplication > ( remoteApps , MockObject . ContainsExpectedStartMenu ) ,
163
164
"The actual result does not match the expected."
164
165
) ;
165
166
0 commit comments