@@ -101,10 +101,7 @@ public static void InitStreamSystemWithRandomStream(out StreamSystem system, out
101101 string clientProviderNameLocator = "stream-locator" )
102102 {
103103 stream = Guid . NewGuid ( ) . ToString ( ) ;
104- var config = new StreamSystemConfig
105- {
106- ClientProvidedName = clientProviderNameLocator
107- } ;
104+ var config = new StreamSystemConfig { ClientProvidedName = clientProviderNameLocator } ;
108105 system = StreamSystem . Create ( config ) . Result ;
109106 var x = system . CreateStream ( new StreamSpec ( stream ) ) ;
110107 x . Wait ( ) ;
@@ -147,7 +144,7 @@ public static async Task PublishMessages(StreamSystem system, string stream, int
147144 }
148145
149146 testPassed . Task . Wait ( TimeSpan . FromSeconds ( 10 ) ) ;
150- Assert . Equal ( producer . MessagesSent , numberOfMessages ) ;
147+ Assert . Equal ( numberOfMessages , testPassed . Task . Result ) ;
151148 Assert . True ( producer . ConfirmFrames >= 1 ) ;
152149 Assert . True ( producer . IncomingFrames >= 1 ) ;
153150 Assert . True ( producer . PublishCommandsSent >= 1 ) ;
@@ -169,7 +166,8 @@ public static async Task<bool> IsConnectionOpen(string connectionName)
169166 var result = await client . GetAsync ( "http://localhost:15672/api/connections" ) ;
170167 if ( ! result . IsSuccessStatusCode )
171168 {
172- throw new XunitException ( string . Format ( "HTTP GET failed: {0} {1}" , result . StatusCode , result . ReasonPhrase ) ) ;
169+ throw new XunitException ( string . Format ( "HTTP GET failed: {0} {1}" , result . StatusCode ,
170+ result . ReasonPhrase ) ) ;
173171 }
174172
175173 var obj = JsonSerializer . Deserialize ( result . Content . ReadAsStream ( ) , typeof ( IEnumerable < Connection > ) ) ;
@@ -242,7 +240,8 @@ public static void HttpPost(string jsonBody, string api)
242240 var result = task . Result ;
243241 if ( ! result . IsSuccessStatusCode )
244242 {
245- throw new XunitException ( string . Format ( "HTTP POST failed: {0} {1}" , result . StatusCode , result . ReasonPhrase ) ) ;
243+ throw new XunitException ( string . Format ( "HTTP POST failed: {0} {1}" , result . StatusCode ,
244+ result . ReasonPhrase ) ) ;
246245 }
247246 }
248247
0 commit comments