@@ -24,7 +24,8 @@ The following examples demonstrate the capabilities of the library:
24
24
25
25
### Comparing Flat Objects
26
26
27
- <pre class =" prettyprint " >public class when_retrieving_a_customer
27
+ ``` C#
28
+ public class when_retrieving_a_customer
28
29
{
29
30
static Customer _actual ;
30
31
static ExpectedObject _expected ;
@@ -54,7 +55,7 @@ class Customer
54
55
public string Name { get ; set ; }
55
56
public string PhoneNumber { get ; set ; }
56
57
}
57
- </ pre >
58
+ ```
58
59
59
60
Results:
60
61
@@ -70,7 +71,8 @@ Results:
70
71
71
72
### Comparing Composed Objects
72
73
73
- <pre class =" prettyprint " >public class when_retrieving_a_customer_with_address
74
+ ``` C#
75
+ public class when_retrieving_a_customer_with_address
74
76
{
75
77
static Customer _actual ;
76
78
static ExpectedObject _expected ;
@@ -128,7 +130,7 @@ class Address
128
130
public string State { get ; set ; }
129
131
public string Zipcode { get ; set ; }
130
132
}
131
- </ pre >
133
+ ```
132
134
133
135
Results:
134
136
@@ -148,7 +150,8 @@ Results:
148
150
149
151
### Comparing Collections
150
152
151
- <pre class =" prettyprint " >public class when_retrieving_a_collection_of_customers
153
+ ``` C#
154
+ public class when_retrieving_a_collection_of_customers
152
155
{
153
156
static List<Customer> _actual;
154
157
static ExpectedObject _expected ;
@@ -170,7 +173,7 @@ Results:
170
173
171
174
It should_return_the_expected_customers = () => _expected .ShouldEqual (_actual );
172
175
}
173
- </ pre >
176
+ ```
174
177
175
178
Results:
176
179
@@ -184,7 +187,8 @@ Results:
184
187
185
188
### Comparing Dictionaries
186
189
187
- <pre class =" prettyprint " >public class when_retrieving_a_dictionary
190
+ ``` C#
191
+ public class when_retrieving_a_dictionary
188
192
{
189
193
static IDictionary<string, string> _actual;
190
194
static IDictionary<string, string> _expected;
@@ -199,7 +203,7 @@ Results:
199
203
200
204
It should_return_the_expected_dictionary = () => _expected .ToExpectedObject ().ShouldEqual (_actual );
201
205
}
202
- </ pre >
206
+ ```
203
207
204
208
Results:
205
209
@@ -213,7 +217,8 @@ Results:
213
217
214
218
### Comparing Types with Indexes
215
219
216
- <pre class =" prettyprint " >public class when_retrieving_a_type_with_an_index
220
+ ``` C#
221
+ public class when_retrieving_a_type_with_an_index
217
222
{
218
223
static IndexType<int> _actual;
219
224
static IndexType<int> _expected;
@@ -250,7 +255,7 @@ class IndexType<T>
250
255
get { return _ints .Count ; }
251
256
}
252
257
}
253
- </ pre >
258
+ ```
254
259
255
260
Results:
256
261
@@ -264,7 +269,8 @@ Results:
264
269
265
270
### Comparing Partial Objects
266
271
267
- <pre class =" prettyprint " >public class when_retrieving_a_customer
272
+ ``` C#
273
+ public class when_retrieving_a_customer
268
274
{
269
275
static Customer _actual ;
270
276
static ExpectedObject _expected ;
@@ -297,7 +303,7 @@ Results:
297
303
298
304
It should_have_the_correct_name_and_address = () => _expected .ShouldMatch (_actual );
299
305
}
300
- </ pre >
306
+ ```
301
307
302
308
Results:
303
309
@@ -328,13 +334,13 @@ Results:
328
334
</p >
329
335
330
336
331
- < pre class = " prettyprint " >
337
+ ``` C#
332
338
public interface IComparisonStrategy
333
339
{
334
340
bool CanCompare (Type type );
335
341
bool AreEqual (object expected , object actual , IComparisonContext comparisonContext );
336
342
}
337
- </ pre >
343
+ ```
338
344
339
345
340
346
<p >
@@ -369,7 +375,7 @@ _expected = new Foo("Bar")
369
375
</p >
370
376
371
377
372
- < pre class = " prettyprint " >
378
+ ``` C#
373
379
public class when_displaying_the_customer_view
374
380
{
375
381
static Mock<IWebDriver> _actual;
@@ -402,7 +408,7 @@ public class when_displaying_the_customer_view
402
408
403
409
It should_display_the_expected_view = () => _expected .ShouldEqual (_actual .Object );
404
410
}
405
- </ pre >
411
+ ```
406
412
407
413
408
414
<p >
@@ -437,7 +443,7 @@ public class when_displaying_the_customer_view
437
443
</p >
438
444
439
445
440
- < pre class = " prettyprint " >
446
+ ``` C#
441
447
class ExpectedView
442
448
{
443
449
public ExpectedView ()
@@ -514,7 +520,7 @@ class ExpecedViewComparisonStrategy : IComparisonStrategy
514
520
return areEqual ;
515
521
}
516
522
}
517
- </ pre >
523
+ ```
518
524
519
525
520
526
<p >
0 commit comments