Skip to content

Commit 1ca96c9

Browse files
author
Derek Greer
committed
fixed formatting
1 parent cb56e6e commit 1ca96c9

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

_derekgreer/2011-06-28-introducing-the-expected-objects-library.md

+24-18
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ The following examples demonstrate the capabilities of the library:
2424

2525
### Comparing Flat Objects
2626

27-
<pre class="prettyprint">public class when_retrieving_a_customer
27+
```C#
28+
public class when_retrieving_a_customer
2829
{
2930
static Customer _actual;
3031
static ExpectedObject _expected;
@@ -54,7 +55,7 @@ class Customer
5455
public string Name { get; set; }
5556
public string PhoneNumber { get; set; }
5657
}
57-
</pre>
58+
```
5859

5960
Results:
6061

@@ -70,7 +71,8 @@ Results:
7071

7172
### Comparing Composed Objects
7273

73-
<pre class="prettyprint">public class when_retrieving_a_customer_with_address
74+
```C#
75+
public class when_retrieving_a_customer_with_address
7476
{
7577
static Customer _actual;
7678
static ExpectedObject _expected;
@@ -128,7 +130,7 @@ class Address
128130
public string State { get; set; }
129131
public string Zipcode { get; set; }
130132
}
131-
</pre>
133+
```
132134

133135
Results:
134136

@@ -148,7 +150,8 @@ Results:
148150

149151
### Comparing Collections
150152

151-
<pre class="prettyprint">public class when_retrieving_a_collection_of_customers
153+
```C#
154+
public class when_retrieving_a_collection_of_customers
152155
{
153156
static List&lt;Customer> _actual;
154157
static ExpectedObject _expected;
@@ -170,7 +173,7 @@ Results:
170173

171174
It should_return_the_expected_customers = () => _expected.ShouldEqual(_actual);
172175
}
173-
</pre>
176+
```
174177

175178
Results:
176179

@@ -184,7 +187,8 @@ Results:
184187

185188
### Comparing Dictionaries
186189

187-
<pre class="prettyprint">public class when_retrieving_a_dictionary
190+
```C#
191+
public class when_retrieving_a_dictionary
188192
{
189193
static IDictionary&lt;string, string> _actual;
190194
static IDictionary&lt;string, string> _expected;
@@ -199,7 +203,7 @@ Results:
199203

200204
It should_return_the_expected_dictionary = () => _expected.ToExpectedObject().ShouldEqual(_actual);
201205
}
202-
</pre>
206+
```
203207

204208
Results:
205209

@@ -213,7 +217,8 @@ Results:
213217

214218
### Comparing Types with Indexes
215219

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
217222
{
218223
static IndexType&lt;int> _actual;
219224
static IndexType&lt;int> _expected;
@@ -250,7 +255,7 @@ class IndexType&lt;T>
250255
get { return _ints.Count; }
251256
}
252257
}
253-
</pre>
258+
```
254259

255260
Results:
256261

@@ -264,7 +269,8 @@ Results:
264269

265270
### Comparing Partial Objects
266271

267-
<pre class="prettyprint">public class when_retrieving_a_customer
272+
```C#
273+
public class when_retrieving_a_customer
268274
{
269275
static Customer _actual;
270276
static ExpectedObject _expected;
@@ -297,7 +303,7 @@ Results:
297303

298304
It should_have_the_correct_name_and_address = () => _expected.ShouldMatch(_actual);
299305
}
300-
</pre>
306+
```
301307

302308
Results:
303309

@@ -328,13 +334,13 @@ Results:
328334
</p>
329335

330336

331-
<pre class="prettyprint">
337+
```C#
332338
public interface IComparisonStrategy
333339
{
334340
bool CanCompare(Type type);
335341
bool AreEqual(object expected, object actual, IComparisonContext comparisonContext);
336342
}
337-
</pre>
343+
```
338344

339345

340346
<p>
@@ -369,7 +375,7 @@ _expected = new Foo("Bar")
369375
</p>
370376

371377

372-
<pre class="prettyprint">
378+
```C#
373379
public class when_displaying_the_customer_view
374380
{
375381
static Mock&lt;IWebDriver> _actual;
@@ -402,7 +408,7 @@ public class when_displaying_the_customer_view
402408

403409
It should_display_the_expected_view = () => _expected.ShouldEqual(_actual.Object);
404410
}
405-
</pre>
411+
```
406412

407413

408414
<p>
@@ -437,7 +443,7 @@ public class when_displaying_the_customer_view
437443
</p>
438444

439445

440-
<pre class="prettyprint">
446+
```C#
441447
class ExpectedView
442448
{
443449
public ExpectedView()
@@ -514,7 +520,7 @@ class ExpecedViewComparisonStrategy : IComparisonStrategy
514520
return areEqual;
515521
}
516522
}
517-
</pre>
523+
```
518524

519525

520526
<p>

0 commit comments

Comments
 (0)